compilation

Go 1.5+ : Error - imports runtime: C source files not allowed when not using cgo or SWIG

前提是你 提交于 2020-12-29 02:47:07
问题 My program was building perfectly with go 1.4.2. After installing go 1.5, I am getting following error. imports runtime: C source files not allowed when not using cgo or SWIG: atomic_amd64x.c defs.c float.c heapdump.c lfstack.c malloc.c mcache.c mcentral.c mem_linux.c mfixalloc.c mgc0.c mheap.c msize.c os_linux.c panic.c parfor.c proc.c runtime.c signal.c signal_amd64x.c signal_unix.c stack.c string.c sys_x86.c vdso_linux_amd64.c The error is not program dependent. Even a "Hello world"

Go 1.5+ : Error - imports runtime: C source files not allowed when not using cgo or SWIG

若如初见. 提交于 2020-12-29 02:47:06
问题 My program was building perfectly with go 1.4.2. After installing go 1.5, I am getting following error. imports runtime: C source files not allowed when not using cgo or SWIG: atomic_amd64x.c defs.c float.c heapdump.c lfstack.c malloc.c mcache.c mcentral.c mem_linux.c mfixalloc.c mgc0.c mheap.c msize.c os_linux.c panic.c parfor.c proc.c runtime.c signal.c signal_amd64x.c signal_unix.c stack.c string.c sys_x86.c vdso_linux_amd64.c The error is not program dependent. Even a "Hello world"

How to use SDL with gcc?

↘锁芯ラ 提交于 2020-12-27 07:16:37
问题 I download SDL source at 'https://www.libsdl.org' I use cmake and get library. libSDL2.a libSDL2main.a libSDL2-2.0.so libSDL2-2.0.so.0 libSDL2-2.0.so.0.4.0 I write main.c to test SDL. #include <SDL.h> int main() { SDL_Init(SDL_INIT_VIDEO); SDL_Quit(); return 0; } I make lib directory. I move *.a file and include directory. vim main.c mkdir lib mv libSDL2.a libSDL2main.a ./lib mv /home/gakgu/다운로드/SDL2-2.0.4/include ./ Then try compile. gcc -W -Wall -o main main.c -Iinclude -Llib -lSDL2

How to use SDL with gcc?

安稳与你 提交于 2020-12-27 07:15:55
问题 I download SDL source at 'https://www.libsdl.org' I use cmake and get library. libSDL2.a libSDL2main.a libSDL2-2.0.so libSDL2-2.0.so.0 libSDL2-2.0.so.0.4.0 I write main.c to test SDL. #include <SDL.h> int main() { SDL_Init(SDL_INIT_VIDEO); SDL_Quit(); return 0; } I make lib directory. I move *.a file and include directory. vim main.c mkdir lib mv libSDL2.a libSDL2main.a ./lib mv /home/gakgu/다운로드/SDL2-2.0.4/include ./ Then try compile. gcc -W -Wall -o main main.c -Iinclude -Llib -lSDL2

How to use SDL with gcc?

社会主义新天地 提交于 2020-12-27 07:15:07
问题 I download SDL source at 'https://www.libsdl.org' I use cmake and get library. libSDL2.a libSDL2main.a libSDL2-2.0.so libSDL2-2.0.so.0 libSDL2-2.0.so.0.4.0 I write main.c to test SDL. #include <SDL.h> int main() { SDL_Init(SDL_INIT_VIDEO); SDL_Quit(); return 0; } I make lib directory. I move *.a file and include directory. vim main.c mkdir lib mv libSDL2.a libSDL2main.a ./lib mv /home/gakgu/다운로드/SDL2-2.0.4/include ./ Then try compile. gcc -W -Wall -o main main.c -Iinclude -Llib -lSDL2

How to use SDL with gcc?

只愿长相守 提交于 2020-12-27 07:14:07
问题 I download SDL source at 'https://www.libsdl.org' I use cmake and get library. libSDL2.a libSDL2main.a libSDL2-2.0.so libSDL2-2.0.so.0 libSDL2-2.0.so.0.4.0 I write main.c to test SDL. #include <SDL.h> int main() { SDL_Init(SDL_INIT_VIDEO); SDL_Quit(); return 0; } I make lib directory. I move *.a file and include directory. vim main.c mkdir lib mv libSDL2.a libSDL2main.a ./lib mv /home/gakgu/다운로드/SDL2-2.0.4/include ./ Then try compile. gcc -W -Wall -o main main.c -Iinclude -Llib -lSDL2

How to use SDL with gcc?

只谈情不闲聊 提交于 2020-12-27 07:13:58
问题 I download SDL source at 'https://www.libsdl.org' I use cmake and get library. libSDL2.a libSDL2main.a libSDL2-2.0.so libSDL2-2.0.so.0 libSDL2-2.0.so.0.4.0 I write main.c to test SDL. #include <SDL.h> int main() { SDL_Init(SDL_INIT_VIDEO); SDL_Quit(); return 0; } I make lib directory. I move *.a file and include directory. vim main.c mkdir lib mv libSDL2.a libSDL2main.a ./lib mv /home/gakgu/다운로드/SDL2-2.0.4/include ./ Then try compile. gcc -W -Wall -o main main.c -Iinclude -Llib -lSDL2

How to use SDL with gcc?

谁说我不能喝 提交于 2020-12-27 07:13:57
问题 I download SDL source at 'https://www.libsdl.org' I use cmake and get library. libSDL2.a libSDL2main.a libSDL2-2.0.so libSDL2-2.0.so.0 libSDL2-2.0.so.0.4.0 I write main.c to test SDL. #include <SDL.h> int main() { SDL_Init(SDL_INIT_VIDEO); SDL_Quit(); return 0; } I make lib directory. I move *.a file and include directory. vim main.c mkdir lib mv libSDL2.a libSDL2main.a ./lib mv /home/gakgu/다운로드/SDL2-2.0.4/include ./ Then try compile. gcc -W -Wall -o main main.c -Iinclude -Llib -lSDL2

How to use SDL with gcc?

爷,独闯天下 提交于 2020-12-27 07:12:46
问题 I download SDL source at 'https://www.libsdl.org' I use cmake and get library. libSDL2.a libSDL2main.a libSDL2-2.0.so libSDL2-2.0.so.0 libSDL2-2.0.so.0.4.0 I write main.c to test SDL. #include <SDL.h> int main() { SDL_Init(SDL_INIT_VIDEO); SDL_Quit(); return 0; } I make lib directory. I move *.a file and include directory. vim main.c mkdir lib mv libSDL2.a libSDL2main.a ./lib mv /home/gakgu/다운로드/SDL2-2.0.4/include ./ Then try compile. gcc -W -Wall -o main main.c -Iinclude -Llib -lSDL2

What's wrong with linux/ext2_fs.h?

落花浮王杯 提交于 2020-12-26 11:38:49
问题 cat main.c #include <stdio.h> #include <stdlib.h> #include <linux/ext2_fs.h> int main(int argc, char** argv) { return (EXIT_SUCCESS); } Here is my output... gcc main.c In file included from main.c:3: /usr/include/linux/ext2_fs.h: In function ‘ext2_mask_flags’: /usr/include/linux/ext2_fs.h:182: error: ‘FS_DIRSYNC_FL’ undeclared (first use in this function) /usr/include/linux/ext2_fs.h:182: error: (Each undeclared identifier is reported only once /usr/include/linux/ext2_fs.h:182: error: for