Those are generated by external C functions. But it seems the path is wrong (Blocks/ should be ommited). I'll fix it quick (r15244). I now also filter out paths that do not exist (Linux ld won't warn about paths that don't exist). But it sort of makes everything look like magic when suddenly some library gets the LibraryDirectory automatically added. People will need to read the specification, I guess.

The magic comes from:
12.9.4 Annotations for External Libraries and Include Files

Now when I
$ mkdir -p ".../lib/omlibrary/Modelica\ 3.2.1/Resources/Library/linux64"
$ omc +s a.mo Modelica
$ make -f M.makefile
...
g++-4.4 ... "-L/home/martin/trunk/build/lib/omlibrary/Modelica 3.2.1/Resources/Library/linux64" ...

And if the library doesn't exit, the -L is not generated.

--
Martin Sjölund

On 02/19/2013 09:31 PM, Bill Janssen wrote:
I'm building the simulation program for a large model which uses Blocks
extensively, and I'm getting a compile-time warning:

% omc +s +i=C2M2L_OM.C2M2L_Test_Assemblies.no_controls test.mo ModelicaServices 
Modelica C2M2L_OM
% make -f C2M2L_OM.C2M2L_Test_Assemblies.no_controls.makefile
gcc-4.2   -falign-functions -msse2 -mfpmath=sse   -I"/local/open-modelica/include/omc" 
-I. -L"/local/open-modelica/lib/omlibrary/C2M2L_OM"   -c -o 
C2M2L_OM.C2M2L_Test_Assemblies.no_controls.o C2M2L_OM.C2M2L_Test_Assemblies.no_controls.c
gcc-4.2   -falign-functions -msse2 -mfpmath=sse   -I"/local/open-modelica/include/omc" 
-I. -L"/local/open-modelica/lib/omlibrary/C2M2L_OM"   -c -o 
C2M2L_OM.C2M2L_Test_Assemblies.no_controls_records.o 
C2M2L_OM.C2M2L_Test_Assemblies.no_controls_records.c
g++-4.2 -I. -o C2M2L_OM.C2M2L_Test_Assemblies.no_controls C2M2L_OM.C2M2L_Test_Assemblies.no_controls.o 
C2M2L_OM.C2M2L_Test_Assemblies.no_controls_records.o -I"/local/open-modelica/include/omc" -I. 
-L"/local/open-modelica/lib/omlibrary/C2M2L_OM"  -L"/local/open-modelica/lib/omlibrary/C2M2L_OM"  -lModelicaExternalC 
"-L/local/open-modelica/lib/omlibrary/Modelica 3.2.1/Blocks/Resources/Library/darwin-x86_64" 
"-L/local/open-modelica/lib/omlibrary/Modelica 3.2.1/Blocks/Resources/Library"   -falign-functions -msse2 -mfpmath=sse   
-L"/local/open-modelica/lib/omc" -Wl,-rpath,'/local/open-modelica/lib/omc' -lSimulationRuntimeC   -ldl -linteractive  -lexpat 
-L/local/open-modelica/lib  -lintl -liconv -lgc  -lsundials_kinsol -lsundials_nvecserial -llapack  -lpthread -lf2c
ld: warning: directory not found for option 
'-L/local/open-modelica/lib/omlibrary/Modelica 
3.2.1/Blocks/Resources/Library/darwin-x86_64'
ld: warning: directory not found for option 
'-L/local/open-modelica/lib/omlibrary/Modelica 3.2.1/Blocks/Resources/Library'
%

What's producing those references to a non-existent
Blocks/Resources/Library?  I'm running with a checkout from the trunk,
built and installed today.  No Blocks/Resources/Library.

Bill


Reply via email to