Hi Otavio,

Thnaks for your help!

Actually, we got it figured it: it's weird, but the ".lib" can also be an
"import lib" with the same extension as the static lib. On Windows,
functions are not exported by default, and since I hadn't properly exported
any of the functions yet, not import lib was generated. I fixed it by adding
the FREERDP_API definitions to all exported functions. When linking to a
dll, you must link against the .lib (import lib, not static lib).

Now it is almost working, I'm getting a linker error for OpenSSL even though
the libraries have been detected and added by cmake.

Best regards,
- Marc-Andre

On Wed, Aug 17, 2011 at 8:57 AM, Otavio Salvador <ota...@ossystems.com.br>wrote:

> On Tue, Aug 16, 2011 at 22:32, Marc-André Moreau
> <marcandre.mor...@gmail.com> wrote:
> ...
> > While cmake successfully builds DLLs for the multiple libraries we have,
> it
> > attempts to link to those libraries as .libs which are not generated.
> Does
> > anyone know how to work around this problem? It's probably the last thing
> > preventing me from getting a new wfreerdp in 1.0.
>
> if(WIN32)
>  set(SOURCES ${COMMON_SRCS} ${WIN32_SRCS})
>  include_directories(${CMAKE_INSTALL_PREFIX}/include)
>  add_definitions(-D_CRT_SECURE_NO_WARNINGS)
>  add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
>
>  string(REPLACE "/MD" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
>  set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
>  string(REPLACE "/MDd" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
>  set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
> endif()
>
> add_library(foolibrary STATIC ${SOURCES})
>
> .lib files are static files on Windows World. The above is an snip of
> one project we have at O.S. Systems that does it.
>
> --
> Otavio Salvador                             O.S. Systems
> E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
> Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
>
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Freerdp-devel mailing list
Freerdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to