User forums > Help
problem in compiling an application source file with C:B
McZim:
i'm not create main.c and yes i added libraries.
please send me you project. mczimm@gmail.com
parisa_k:
I sent it .... if you could find the solution please tell me... I expect that after compiling a correct executable file become created in bin>debug
the current one is not correct if you run it it gives segmentation fault
McZim:
i'm compile you project and see error in the string:
--- Code: ---char *build_name = NAME;
--- End code ---
--- Code: ---/home/mczim/main/trash/iozone_benchmark/iozone/iozone.c|1237|error: initialization makes pointer from integer without a cast|
--- End code ---
parisa_k:
thanks for your help...but I really don`t know how could this happen ... when I run it, gives no error...
but anyway ....this error that you said, shows that NAME is not defined....
please go to build option, Debug ..and in #defines tab check whether defines are correctly set ...if they are not set, set them and build&run the project again.........
NAME="linux"
unix
linux
HAVE_ANSIC_C
ASYNC_IO
_LARGEFILE64_SOURCE
SHARED_MEM
HAVE_PREAD
another thing is that you may seen that it compiles using make file (if not, you can check it now)....so it shows that the code has no problem ...the question is that how to compile it using code blocks.................
this is the source of IOZone Filesystem Benchmark :www.iozone.org
ofcourse the benchmark source is correct and has no problem .............maybe I have to set some other options in code blocks to compile it...I want to know what are they????
maybe you have another way to compile this source code in C::B...what is your suggestion???
thanks
parisa_k:
--- Quote from: jens on August 27, 2008, 02:43:42 pm ---The first point is that this question is not really C::B related.
--- End quote ---
of course this problem is directly related to C::B because the source code is surely correct and I have tested it before (it`s the source code of IOZone Filesystem Benchmark)
--- Quote from: jens on August 27, 2008, 02:43:42 pm ---The second is that the code compiles with tons of warnings and is not really readable.
--- End quote ---
as I said the code has no errors ...but if you see any errors you can report it to IOZone working team (www.iozone.org)...they would be thankful because till now no one could see any errors in this code
--- Quote from: jens on August 27, 2008, 02:43:42 pm ---The third is that compiling it with C::B is quiet easy if you use the makefile, otherwise it needs some more tweaking.
--- End quote ---
maybe it`s easy for you, but I have spent a lot of time but I couldn`t solve the problem yet ...if you could explain your easy solution for me, I would be really thankful
--- Quote from: jens on August 27, 2008, 02:43:42 pm ---And the fourth and most important is that you posted the link to the code just 6 hours ago and if nobody has answered your question in a way that it works for you means that nobody has an idea how to do that, or nobody wants to do your homework.
--- End quote ---
First it`s not a homework or sth like that ,...I `m just trying to learn how to use C::B and also I `d like to know about C::B specifications, to see whether it `s suitable for my need as a C IDE or not
Second I think the best way to solve this problem is to ask for others solutions here, If you have any other suggestion, I`d be thankful if it could help
And the third and most important is that, if you don`t have any answer for my posts, it doesn`t need to post such a thing....I accept that I`m new to C::B and this question is really a basic (and perhaps simple) but I expect the others to help me not to tease ....
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version