Hi Alex!

Thanks a lot for your replies. 

I’m trying to follow your suggestion but I’m not understanding how can I link 
to EXE file.

If I simply explicit the full path to stellarium.exe in the 
TARGET_LINK_LIBRARIES (in CMakeLists  inside the src directory of my plugin) I 
get another file not found error while compiling. The build tool search 
obviously for a “.lib” file:

 

error LNK1181: cannot open input file 'stellarium.exe.lib'

 

I don’t know if this behavior can be changed by modifying cmake files.

My statements inside CMakeLists are:

IF(BUILD_DYNAMIC_LIB)

ADD_LIBRARY(MeteoInfo MODULE ${MeteoInfo_SRCS} ${MeteoInfo_MOC_SRCS} 
${MeteoInfo_RES_CXX} ${MeteoInfo_UIS_H})

 

IF(WIN32)

  SET_TARGET_PROPERTIES(MeteoInfo PROPERTIES LINK_FLAGS 
"-Wl,--enable-runtime-pseudo-reloc -Wl,--allow-multiple-definition" )

  SET(StelMain stelMain)

ELSE(WIN32)

  SET(StelMain)

ENDIF(WIN32)

 

TARGET_LINK_LIBRARIES(MeteoInfo ${StelMain} ${extLinkerOption})

 

Where MeteoInfo is the ‘name’ of my plugin.

Thanks a lot

Rick

 

Da: Alexander Wolf [mailto:alex.v.w...@gmail.com] 
Inviato: sabato 24 gennaio 2015 13:57
A: Stellarium developers public mailing list
Oggetto: Re: [Stellarium-pubdevel] Build dynamic plugin

 

Hi!

 

2015-01-23 21:45 GMT+06:00 Griflet <grif...@libero.it>:

Hi, I wrote a static plugin that I would like to convert to dynamic but I’m not 
able to build it under windows (Win7 x64, Visual Studio 2012, Qt 5.2.1, Cmake 
3.0.2).

The static version works fine on Stellarium 0.13.1 but when I try to compile it 
as dynamic (obviously after creating the appropriate cmake files, starting from 
official examples) I get following linking error:

 

error LNK1181: cannot open input file 'stelMain.lib'

 

A small addition: in the theory you can use .exe as library - are you tried it 
already?

 

-- 

With best regards, Alexander

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Stellarium-pubdevel mailing list
Stellarium-pubdevel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel

Reply via email to