Hi,
this looks like a bug...
I was trying to compile OpenModelica on a Intel platform with gcc and I got a 
problem with a function called errmsg():

-------------------------
g++ -o omc Absyn.o Algorithm.o Builtin.o Ceval.o ClassInf.o ClassLoader.o 
Codegen.o Connect.o Convert.o DAE.o DAELow.o Derive.o Debug.o DFA.o Dump.o 
DumpGraphviz.o Constants.o Env.o Error.o Exp.o SCode.o Graphviz.o Inst.o 
Interactive.o Lookup.o Main.o MetaUtil.o Mod.o ModUtil.o Patternm.o Prefix.o 
Static.o SimCodegen.o Types.o TaskGraph.o Util.o Values.o VarTransform.o 
Refactor.o 
DAEQuery.o ../absyn_builder/absyn_builder.a ../runtime/systemimpl.o 
../../c_runtime/libc_runtime.a ../runtime/rtopts.o ../runtime/socketimpl.o 
../runtime/printimpl.o ../runtime/ptolemyio.o ../runtime/errorext.o 
../runtime/ErrorMessage.o ../runtime/daeext.o ../runtime/corbaimpl_stub.o 
../modpar/libmodpar.a ../runtime/settingsimpl.o -lm 
-L/scratch/zenith/usr//lib/plain -lrml -L/scratch/zenith/usr/lib/ -lantlr   
-ldl -L../../build/lib -lsendData
../../build/lib/libsendData.a(libsendData.o): In function `errmsg':
humbug.cpp:(.text+0x7c): multiple definition of `errmsg'
../runtime/corbaimpl_stub.o:corbaimpl_stub.cpp:(.text+0x78): first defined 
here
-------------------------

It seems that corbaimpl_stub.cpp implements an errmsg() function that 
interferes with humbug.cpp's.

Maybe a different name or a namespace would be better? I changed all "errmsg" 
in corbaimpl_stub.cpp (which are not referred elsewhere) to errmsg_CORBA, and 
everything compiled merrily. I leave to the developers to find a better name 
for it. In any case, such a generic name as "errmsg" in global scope is a bad 
idea.

Cheers,
-Federico

PS- By the way, am I losing any significant capability if I drop CORBA 
support? I am really ignorant about this, so if anyone has the patience to 
explain me or to give me a pointer, I would be grateful.

Attachment: pgpQbJldofIly.pgp
Description: PGP signature

Reply via email to