
I guess my mail program (Outlook) reduplicates the > g++ on every new line when it splits up the lines. Sorry about this.
g++ -I sources/3rdParty/boost -I sources/3rdParty/local-config/linux/ -Lsources/3rdParty/releases/linux/debug -lboost_regex test.cpp [works]
g++ -I sources/3rdParty/boost -I sources/3rdParty/local-config/linux/ -Lsources/3rdParty/releases/linux/release -lboost_regex test.cpp [gives above error]
Well.... the obvious mistake is that the library name must occur *after* the source file that uses it.
Does this help?
Not really. The library name must occur after all libraries that use that library (that is, order of decreasing dependency). But in this case I'm compiling a small cpp directly into an a.out. The cpp name is the input to the compiler and should be placed after all options, including the options that g++ is expected to pass to the linker. Your answer further does not explain why the corresponding and similar command line works with the debug version of the library. I have seen problems like this in cases of wrong inline instantiations. I remember a similar problem in Visual Studio with an exported (inline) template function in an exported class, where the client user of the shared library expects to import a function, but obviously the compiler couldn't generate the template function instantiation when creating the dll, and so there is a resulting import of a nonexistent function -- an undefined reference. This seems to be a related problem, except that in g++ 3.3.3 there is no control of export declarations that I know of. In Visual Studio, the problem would be solved by making the class non- exported, and specifying for the specific necessary functions within the class the export declaration. Also, if this were a result of inlining, it would explain why the problem does not appear in debug. Yitzhak Sapir CONFIDENTIALITY CAUTION This e-mail and any attachments may be confidential or legally privileged. If you received this message in error or are not the intended recipient, you should destroy the e-mail message and any attachments or copies, and you are prohibited from retaining, distributing, disclosing or using any information contained herein. Please inform us of the erroneous delivery by return e-mail. Thank you for your cooperation.