Comments (12)
Did you compile with the CMake variable CELERO_COMPILE_DYNAMIC_LIBRARIES
set to OFF
? If you did, there should be a precompiler definition of CELERO_STATIC
for all of your projects. When that is set, Export.h is supposed to give blank definitions to CELERO_EXPORT
and CELERO_EXPORT_C
. When this is true, you will not have __declspec(dllimport)
used in your project, but this is exactly what I see in your log file. Check to make sure CELERO_STATIC
is defined in all of your projects.
from celero.
While adding CELERO_STATIC
did fix _declspec(dllimport)
errors, I've got a new one:
celerod.lib(Utilities.obj) : error LNK2019: unresolved external symbol CallNtPowerInformation referenced in function "void __cdecl celero::DisableDynamicCPUScaling(void)" (?DisableDynamicCPUScaling@celero@@YAXXZ)
Again, same code (from the example you provided), works with dll build.
from celero.
See: https://msdn.microsoft.com/en-us/library/windows/desktop/aa372675(v=vs.85).aspx
Looks like PowrProf.lib needs to be included. (I haven't actually built with static libraries myself.)
from celero.
Yes, adding PowrProf.lib fixed this issue.
Will you fix the static build or just advise against using it? Either way, I think it would be a good idea to update the README file on project's page.
from celero.
from celero.
No problem. Thank you for creating this great library :)
from celero.
Can you close this issue?
from celero.
Has this actually been fixed? I just ran into this issue (Visual Studio 14 2015 Win64) with the current version.
from celero.
Was the issue that "PowrProf.lib" was not linked or is your problem a new issue?
from celero.
Yeah exactly. I got it fixed for our build, but it seems that the current fix in the Celero CMake file didn't work for me.
from celero.
Ok. Can you push your fix up? Sorry. I don't use it statically and didn't know it was broken still.
from celero.
I only fixed the issue locally by adding a target_link_libraries(PROJECTNAME PowrProf.lib)
to our build. I am not sure why the one from the Celero CMakeLists.txt did not do the job though.
from celero.
Related Issues (20)
- Multiple warnings during compilation via Microsoft Visual Studio HOT 1
- Compiler errors with aggressive warnings enabled
- error: loop variable 'udm' of type 'const std::__1::shared_ptr<celero::UserDefinedMeasurement>' creates a copy from type 'const std::__1::shared_ptr<celero::UserDefinedMeasurement>' HOT 1
- Documentation link not present in README HOT 1
- Samples and iterations are only computed for first size of problem space (division by zero)
- UDM Fields are not printed properly
- Add User Defined Measurements to output files HOT 1
- Test executable fails: No Baseline case defined for "". Exiting.*** Error code 1 HOT 1
- ARCHIVE_OUTPUT_NAME always has ".dll" even for static builds
- Support vcpkg --triplet x64-windows-static-md
- celero 2.8.0 OSX test build failure HOT 3
- Tests terminate with Signal 11 HOT 4
- Truncation of group and experiment names in standard output HOT 1
- Problems with building / packaging celero HOT 5
- Passing invalid group name in the command line segfaults HOT 1
- [2.8.4 regression] c++: error: no such file or directory: '/wd4251' HOT 1
- Memory Measurement on macOS HOT 3
- Add User-Defined String field to Result Table CSV HOT 3
- Celero/experiments/ExperimentCompressBools has a bad cast HOT 2
- CMAKE_<BUILD_TYPE>_POSTFIX spills into consuming project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from celero.