Git Product home page Git Product logo

Comments (5)

nigels-com avatar nigels-com commented on July 20, 2024

This looks like a Windows build using vanilla clang.
_DllMainCRTStartup is usally via the VC runtime in my understanding, perhaps -nostartfiles is a problem here.

from glew-cmake.

onthegrid007 avatar onthegrid007 commented on July 20, 2024

How would I go about removing that flag in the compilation?

from glew-cmake.

Perlmint avatar Perlmint commented on July 20, 2024

glew-cmake does not set -nostartfiles flag.
In my assumption, It would be set in some Language-wide flags ex) CMAKE_C_FLAGS. Please check CMakeLists.txt of RAITOEngine or the most top CMakeLists.txt or environment variable.

from glew-cmake.

onthegrid007 avatar onthegrid007 commented on July 20, 2024

I have tried everything to remove this flag, it is not me and it is not from RAITOEngine. I als tried building in release and there's an unresolved symbol to memset that comes up as well as the same error from before. I can't seem to figure out why...

from glew-cmake.

Perlmint avatar Perlmint commented on July 20, 2024

I could not reproduce your error.
I can build libglew_shared with cmake 3.29, clang 11.0 & ninja 1.12 on windows. Also, I found that -nostartfiles is not an issue.

My build log

[1/2] C:\PROGRA~1\LLVM\bin\clang.exe -DGLEW_BUILD -DGLEW_NO_GLU -DVC_EXTRALEAN -DWIN32_MEAN_AND_LEAN -D_CRT_SECURE_NO_WA
RNINGS -Dlibglew_shared_EXPORTS -IC:/Users/perlmint/Documents/glew-cmake/include -g -Xclang -gcodeview -O0 -D_DEBUG -D_D
LL -D_MT -Xclang --dependent-lib=msvcrtd -std=gnu2x -MD -MT CMakeFiles/libglew_shared.dir/src/glew.c.obj -MF CMakeFiles\
libglew_shared.dir\src\glew.c.obj.d -o CMakeFiles/libglew_shared.dir/src/glew.c.obj -c C:/Users/perlmint/Documents/glew-
cmake/src/glew.c
[2/2] C:\WINDOWS\system32\cmd.exe /C "cd . && C:\PROGRA~1\LLVM\bin\clang.exe -nostartfiles -nostdlib -g -Xclang -gcodevi
ew -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd  -fuse-ld=lld-link -shared -o bin\glew-sharedd.dll  -Xlinke
r /MANIFEST:EMBED -Xlinker /implib:lib\glew-sharedd.lib -Xlinker /pdb:bin\glew-sharedd.pdb -Xlinker /version:2.2 CMakeFi
les/libglew_shared.dir/src/glew.c.obj  -lopengl32.lib  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut
32 -luuid -lcomdlg32 -ladvapi32 -loldnames  && cd ."

There is only one difference with your link command. It is --dependent-lib=msvcrtd. But, I removed it from the generated build script and tried to build, the build failed with an unrelated error.

LINK : fatal error LNK1158: cannot run 'rc.exe'

clang: error: linker command failed with exit code 1158 (use -v to see invocation)

If you are still trying this, Can you share your build environment?

from glew-cmake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.