| |
| |
| |
|
Comments:
<donfede> hello folk. i am working on creating a pam module . in that module i need to use both C and C++ ... C for the pam connections, and C++ for the project it's part of (using QT and several other C++ libraries) <donfede> i am running into problems linking the two ... i have wrapped the pam C functions in the module source code within ' extern "C" { } ' blocks ... <donfede> and as long as I don't link any libraries (-lfoo on the g++ command line), it seems to work fine ... <donfede> but once I add a library (-lqui or -lrd) i get PAM unable to dlopen(/lib/security/pam_rd.so) <donfede> PAM [dlerror: /lib/security/pam_rd.so: invalid ELF header] <donfede> so the solution to my problem was pretty much to compile the module using g++ ... my error was :'( using the "libtool bash shell script" instead of the actual library in .libs/ <buck68> I'm having a crazy problem with casting ints to doubles in C... any reason why casting an int to double should produce a NaN? <pfeilspitze> how are you casting? <buck68> pfeilspitze: i've tried all sorts of variations... but the original was jsut fsecs = (double)tv->tv_sec. fsecs is a double. tv is struct timeval * <buck68> i don't trust "isnan()" so much right now... i think there is some kind of optimization bug. <lotek> I get a rather strange error when attempting to configure gcc 4.1.1 from source contained in gcc-4.1.1.tar.bz2. <lotek> configure: error: can not find install-sh or install.sh in . ./.. ./../.. <ferguscan> Anyone have experience with mudflap and threaded programs? It's not behaving for me (false negatives), and I'm wondering if it's a Debian-specific problem. <ferguscan> Could someone run a small test app on a non-Debian machine for me? <vrt> guys, how do i compile gcc on a box where the gcc package is not installed? <tdalman> hello <ferguscan> Anyone here have experience with mudflap? It's not behaving itself under threaded environments (4.1.1) <tehxeer> are there 64bit ports floating around out there? (windows) <tehxeer> i tried djgpp, cant even execure the image <tehxeer> execute* <Zordan> djgpp is the DOS port :) <tehxeer> is there a win64 port =) <tehxeer> djgpp was working fine for me when i was win32 <Zordan> yeah 32 bit windows can run dos binaries <Zordan> mingw is for win32 ... not sure if there is a 64 bit version yet <Zordan> but it doesn't look like there is <Zordan> according to gcc's documentation only linux and free/net BSD are currently supported for x86_64 <tehxeer> seems i fixed the gcc issue, now i just need to find proper nasm and ld images <tehxeer> those are not bundled with mingw, are they? <Zordan> there is a bundle which includes gcc/binutils/win32headers and whatnot <Zordan> this one: http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download <Zordan> and additionaly this one if you like bash and autotools: http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download <GyrosGeier> hi <GyrosGeier> does anyone understand how -fno-exceptions works? <GyrosGeier> I have a piece of code with a function try block around main() <GyrosGeier> when I use -fno-exceptions, I get an error message 'expected init-declarator before "if"' <GyrosGeier> the entire program does not contain the letters "i", followed by "f" <Zordan> with -fno-exceptions try and catch blocks are substituted by if blocks <Zordan> try is replaced by if(true) and catch is replaced by if(false) <alfadir> looking into a larger project doing source to source tranlations. have printed gimple trees and so, and read about pretty-printer. anyone have any more direct pointers where to look or who to talk to ? <GyrosGeier> Zordan, ah, thanks <GyrosGeier> Zordan, that is exactly what I need <Zordan> yw <GyrosGeier> hm <GyrosGeier> it appears that it does the same for function try blocks <Zordan> take a look at the preprocessed code <Zordan> (substitution is done by the preprocessor) <GyrosGeier> ah <GyrosGeier> the preprocessor wouldn't know whether it's a normal try/catch or a function try block <GyrosGeier> because "if" before '{' does not work. <GyrosGeier> hm <mElo97> (newbie) what's a "function try block"? <GyrosGeier> even with -fno-exceptions I still have a stinking big pile of code <GyrosGeier> in fact, I only gained 400 bytes <Zordan> got rid of rtti? <GyrosGeier> mElo97, you put the "try" before the opening block of the function <GyrosGeier> Zordan, yes <GyrosGeier> Zordan, at least I tried <GyrosGeier> Zordan, I still have lots of typeinfo structures in the binary <Zordan> -fno-rtti? <GyrosGeier> Zordan, yep <Zordan> hm -Os and upx? :) <GyrosGeier> -Os gains another 400 bytes <GyrosGeier> upx does not make sense since it doesn't handle my architecture <Zordan> which is? <GyrosGeier> ARM bigendian uClinux <GyrosGeier> oh, and no ELF binaries either <GyrosGeier> ELF does not deal with MMUless arches really <Zordan> well that is problematic then <GyrosGeier> the problem is that it's a program that prints the time. <GyrosGeier> It's 400 KB. <Zordan> heh <GyrosGeier> (statically linked) <GyrosGeier> and fully stripped <GyrosGeier> because the executable format (bLFT) consists of just a 64 byte header in front of the data, and 4 bytes per relocation <mElo97> GyrosGeier, thx I didn't know about it. Found much info on the web... ;- <GyrosGeier> mElo97, it helps you save a layer of indentation at worst, and IIRC you can also catch exceptions in parameter handling or so this way <GyrosGeier> oh wait <GyrosGeier> no, parameters are before <GyrosGeier> because you can access them from the catch block <mElo97> I'm just reading that, and was seeking for the usefulness of a func-try block: Indeed as you said "bad parameter handling" could be implemented this way as a throw() from inside the function body can be caught by the catch() "~counterpart". thx <mElo97> euh <mElo97> I might have confused a few things, please disregard.. <GyrosGeier> mElo97, yes; parameter handling is, however, the caller's duty <GyrosGeier> mElo97, (parameter p***ing can throw as well if you p*** an object by value) <mElo97> GyrosGeier, oh :- you mean if I p*** an object by value, and the constructor of this object throw() something! I never thought about this case.. ok <GyrosGeier> mElo97, if you want to have really interesting and funny effects, p*** a std::auto_ptr by value. <mdmkolb1> Is this a GCC bug? http://cpp.sourceforge.net/?show=17184 <unlink> make segfaults when i set --prefix=/ <unlink> gcc/xgcc specifically <unlink> make bootstrap, sorry <taker12> How can I use win32 dlls when writing a program in the Linux environment? <drewski> does anyone know where I can find the docs on how gcc 3.4.4 mangles names? <Zordan> why? <Zordan> or rather what for? <drewski> I am seeing how difficult it would be to make freepascal able to link to c++ objects in shared object files <drewski> this is most likely beyond my abilities but it doesn't hurt to look :) <Zordan> hm I don't know anything about freepascal or its ABI :/ <drewski> apparently some time ago there was an effort to accomplish this but since then the name mangling for g++ has changed so I'm trying to see if I can update it <drewski> it = freepascal <mdmkolbe|work> drewski: it might be easier to write freepascal binding set for SWIG (http://www.swig.org/). just a thought <Zordan> drewski: http://www.codesourcery.com/cxx-abi/abi.html#mangling <Zordan> that's for gcc4 at least ... not sure about 3.4.4 <drewski> Zordan: thank you ver much!
Return to
#gcc or Go to some related
logs:
#fedora #linuxhelp tablecontentparser ubuntu grub remove the border #css #perl #physics php strtoproper linux wipe ram #css
|
|