ermig1979 / Simd

C++ image processing and machine learning library with using of SIMD: SSE, AVX, AVX-512, AMX for x86/x64, NEON for ARM.
http://ermig1979.github.io/Simd
MIT License
2.06k stars 413 forks source link

build with vs2017 fail #111

Closed AhmedX6 closed 5 years ago

AhmedX6 commented 5 years ago

Hello,

When I build simd library using visual code 2017 I get this error at the end of the build : Error LNK1104 cannot open file 'path..\Simd.lib'

I want to build it as a static library so I uncommented the line : #define SIMD_STATIC I opened the .sln located in vs2017w.

Thanks

AhmedX6 commented 5 years ago

Hello,

I recloned the repository and without uncomment #define SIMD_STATIC I have the .lib generated .. ? Maybe it's not needed ? Please could you update your documentation if that's the case?

Thank you

AhmedX6 commented 5 years ago

Hello,

Tried to link the .lib generated to my project and when I start my project, the .exe is looking for a simd.dll ... So it seems that I have some problems anyway..

Need some help.

ermig1979 commented 5 years ago

Hello.

Do you perform all requirements:

To do this you must change appropriate property (Configuration Type) of Simd project and also uncomment #define SIMD_STATIC in file: simd/src/Simd/SimdConfig.h

?

P.S. You can #define SIMD_STATIC in your project options or before including of "Simd/SimdLib.h"

AhmedX6 commented 5 years ago

Hello,

I did the #define SIMD_STATIC, build is ok. But when I link the .lib to my project, it still looks to .dll I get this error: "The code execution cannot proceed because Simd.dll was not found. Reinstalling the program may fix the problem"

ermig1979 commented 5 years ago

I changed properties of Simd.vsxproj to Static Library. And rebuilt Simd solution. Take files Simd.lib, Alg.lib, SimdLib.h, SimdConfig.h, Simd*.hpp and they move to other separate 'Simd' directory. Create test project:

#define SIMD_STATIC
#include "Simd/SimdLib.h"
int main()
{
    void * ptr = SimdAllocate(16, SimdAlignment());
    SimdFree(ptr);
    return 0;
}

It works if I set linker input libraries to Simd.lib; Alg.lib;

AhmedX6 commented 5 years ago

Thank Ihar you're such a great man. I was missing to change Simd.vsxproj to Static Library. :( My bad... Please could you update your documentation just other do not forget 💯

Thanks