Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake builds empty .lib and .dll? #73

Closed
gedOHub opened this issue Apr 21, 2016 · 5 comments
Closed

CMake builds empty .lib and .dll? #73

gedOHub opened this issue Apr 21, 2016 · 5 comments

Comments

@gedOHub
Copy link

gedOHub commented Apr 21, 2016

Hello,
After build with cmake .dll file is empty. My CMake outputs:

D:\Desktop\usrsctp>cmake D:\Downloads\usrsctp-0.9.3.0\usrsctplib
-- Building for: Visual Studio 12 2013
-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0
-- Check for working C compiler using: Visual Studio 12 2013
-- Check for working C compiler using: Visual Studio 12 2013 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013
-- Check for working CXX compiler using: Visual Studio 12 2013 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of size_t
-- Check size of size_t - done
-- Check size of ssize_t
-- Check size of ssize_t - failed
-- Looking for sys/socket.h
-- Looking for sys/socket.h - not found
-- Looking for sys/queue.h
-- Looking for sys/queue.h - not found
-- Looking for linux/if_addr.h
-- Looking for linux/if_addr.h - not found
-- Looking for linux/rtnetlink.h
-- Looking for linux/rtnetlink.h - not found
-- Looking for netinet/ip_icmp.h
-- Looking for netinet/ip_icmp.h - not found
-- Looking for socket
-- Looking for socket - not found
-- Looking for inet_addr
-- Looking for inet_addr - not found
-- Performing Test HAVE_SA_LEN
-- Performing Test HAVE_SA_LEN - Failed
-- Performing Test HAVE_SIN_LEN
-- Performing Test HAVE_SIN_LEN - Failed
-- Performing Test HAVE_SIN6_LEN
-- Performing Test HAVE_SIN6_LEN - Failed
-- link library: ws2_32
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Desktop/usrsctp

Build output:

D:\Desktop\usrsctp>cmake --build .
Microsoft (R) Build Engine version 12.0.40629.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2016-04-21 19:02:34.
Project "D:\Desktop\usrsctp\ALL_BUILD.vcxproj" on node 1 (default targets).
Project "D:\Desktop\usrsctp\ALL_BUILD.vcxproj" (1) is building "D:\Desktop\usrsctp\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
PrepareForBuild:
......
FinalizeBuildStatus:
Deleting file "usrsctp-static.dir\Debug\usrsctp-static.tlog\unsuccessfulbuild".
Touching "usrsctp-static.dir\Debug\usrsctp-static.tlog\usrsctp-static.lastbuildstate".
Done Building Project "D:\Desktop\usrsctp\usrsctp-static.vcxproj" (default targets).
PrepareForBuild:
Creating directory "Win32\Debug\ALL_BUILD".
Creating directory "Win32\Debug\ALL_BUILD\ALL_BUILD.tlog".
InitializeBuildStatus:
Creating "Win32\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
Building Custom Rule D:/Downloads/usrsctp-0.9.3.0/usrsctplib/CMakeLists.txt
CMake does not need to re-run because D:\Desktop\usrsctp\CMakeFiles\generate.stamp is up-to-date.
FinalizeBuildStatus:
Deleting file "Win32\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild".
Touching "Win32\Debug\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate".
Done Building Project "D:\Desktop\usrsctp\ALL_BUILD.vcxproj" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:29.41

With DLL Export Viewer I see this is empty
When I try to load .lib file I get:

Error 17 error LNK2001: unresolved external symbol

@weinrank
Copy link
Contributor

Hey Gediminas,
i will have a look at it asap.

Felix

@gedOHub
Copy link
Author

gedOHub commented Apr 21, 2016

Founded my problem- mistake in PATH variable. Buillded with nmake.

@gedOHub gedOHub closed this as completed Apr 21, 2016
@weinrank
Copy link
Contributor

Thx for the Feedback, does the correct PATH variable also fix the issue with a CMAKE built?

@gedOHub
Copy link
Author

gedOHub commented Apr 21, 2016

Can't say right now. .dll file is same- empty, but lib file size is bigger then earlier. Haven't tested

@weinrank
Copy link
Contributor

Okay, i see the issue: We don't generate export headers.

We'll try to fix this soon.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants