-
Notifications
You must be signed in to change notification settings - Fork 17
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
about extern function of mymath.cpp error #10
Comments
This project is normally compiled and linked by using “make all” not cmake !
Are you following the README.md instructions ?
If your trying to build for Windows I’m not able to assist much as I don’t have Windows and have never build this project for Windows !
If on Mac or Linux you should be able to install glfw via apt-get or brew etc.
On Windows you would probably have to download and install glfw follow whatever instructions they have on that library doc page. And then I guess you have to use the -L or/and -I switches to tell the linker where it is located.
I would think glfw docs would give you the correct linker options in their app build instructions.
—————-
Chris Hinsley
… On 15 Jul 2022, at 11:08 am, mayidu_lin ***@***.***> wrote:
hi, vygr!
I encountered some problems when running the c++ program, I don't know how to solve it, I would like to ask you。
c_pcb.cpp and c_pcb_dsn.cpp could be compiled and got c_pcb.exe and c_pcb_dsn, but c_pcb_view.cpp had some error.
Since I don't know how to add the glfw library to the Makefile, I use the cmakelists file to perform cmake first, then make.
the errors are the compiler cannot resolve the related functions in mymath.cpp.
The file content of cmakefilelists is:
I'm not very good at c++, hope you can help me take a look, thanks!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
For the mymath.cpp refs you may just need to include “cmath.h” or <math>
It’s likely a difference in what Windows includes as standard for the sin/cos/floor/ceil etc functions used by mymath.cpp
—————-
Chris Hinsley
… On 15 Jul 2022, at 11:20 am, Chris Hinsley ***@***.***> wrote:
This project is normally compiled and linked by using “make all” not cmake !
Are you following the README.md instructions ?
If your trying to build for Windows I’m not able to assist much as I don’t have Windows and have never build this project for Windows !
If on Mac or Linux you should be able to install glfw via apt-get or brew etc.
On Windows you would probably have to download and install glfw follow whatever instructions they have on that library doc page. And then I guess you have to use the -L or/and -I switches to tell the linker where it is located.
I would think glfw docs would give you the correct linker options in their app build instructions.
—————-
Chris Hinsley
>> On 15 Jul 2022, at 11:08 am, mayidu_lin ***@***.***> wrote:
>>
>
> hi, vygr!
>
> I encountered some problems when running the c++ program, I don't know how to solve it, I would like to ask you。
>
> c_pcb.cpp and c_pcb_dsn.cpp could be compiled and got c_pcb.exe and c_pcb_dsn, but c_pcb_view.cpp had some error.
>
> Since I don't know how to add the glfw library to the Makefile, I use the cmakelists file to perform cmake first, then make.
> the errors are the compiler cannot resolve the related functions in mymath.cpp.
>
> The file content of cmakefilelists is:
>
>
> I'm not very good at c++, hope you can help me take a look, thanks!
>
> —
> Reply to this email directly, view it on GitHub, or unsubscribe.
> You are receiving this because you are subscribed to this thread.
|
Whenever I have a missing include file problem I look up the missing symbol/function on cppreference.com and see which header file they say that function is defined in. And make sure that I have included that header in the source file or on the Linker line.
—————-
Chris Hinsley
… On 15 Jul 2022, at 11:20 am, Chris Hinsley ***@***.***> wrote:
This project is normally compiled and linked by using “make all” not cmake !
Are you following the README.md instructions ?
If your trying to build for Windows I’m not able to assist much as I don’t have Windows and have never build this project for Windows !
If on Mac or Linux you should be able to install glfw via apt-get or brew etc.
On Windows you would probably have to download and install glfw follow whatever instructions they have on that library doc page. And then I guess you have to use the -L or/and -I switches to tell the linker where it is located.
I would think glfw docs would give you the correct linker options in their app build instructions.
—————-
Chris Hinsley
>> On 15 Jul 2022, at 11:08 am, mayidu_lin ***@***.***> wrote:
>>
>
> hi, vygr!
>
> I encountered some problems when running the c++ program, I don't know how to solve it, I would like to ask you。
>
> c_pcb.cpp and c_pcb_dsn.cpp could be compiled and got c_pcb.exe and c_pcb_dsn, but c_pcb_view.cpp had some error.
>
> Since I don't know how to add the glfw library to the Makefile, I use the cmakelists file to perform cmake first, then make.
> the errors are the compiler cannot resolve the related functions in mymath.cpp.
>
> The file content of cmakefilelists is:
>
>
> I'm not very good at c++, hope you can help me take a look, thanks!
>
> —
> Reply to this email directly, view it on GitHub, or unsubscribe.
> You are receiving this because you are subscribed to this thread.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi, vygr!
I encountered some problems when running the c++ program, I don't know how to solve it, I would like to ask you。
c_pcb.cpp and c_pcb_dsn.cpp could be compiled and got c_pcb.exe and c_pcb_dsn, but c_pcb_view.cpp had some error.
Since I don't know how to add the glfw library to the Makefile, I use the cmakelists file to perform cmake first, then make.
the errors are the compiler cannot resolve the related functions in mymath.cpp.
The file content of cmakefilelists is:
I'm not very good at c++, hope you can help me take a look, thanks!
errors about:
The text was updated successfully, but these errors were encountered: