@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9



Comments:

<0> well
<0> :(
<0> let's make what knuth said
<1> you should be trying to write a read/write mutex, not drone over maps or lists or heap allocations or other petty nonsense
<0> maps are really nice
<1> or 'performance'
<0> but i think in the context of a read write mutex
<2> I've got to get my daughter in bed.... bbiab
<0> as it is a "system low primitive"
<0> might be quite performance hitter
<0> :)
<1> might be?
<0> heap allocation is really slow
<1> so what?
<1> you can write your own allocator later
<0> mm



<0> i thouthg writting some
<0> :)
<1> you need a mutex first, before you can optimize stupid little things like that
<0> i have a mutex
<1> a r/w one?
<0> not yet :)
<1> you're an annoyance to talk to
<0> why? :(
<1> it's possible to communicate without being perfectly verbose in every single thought
<0> what do you mean by that?
<1> nothing
<0> come on :)
<3> What happened to #programming ?
<2> I dunno, what happened?
<4> You guys use minGW's ld.exe sometimes right?
<4> http://www.noidea128.org/sourcefiles/15913.html <- I'm trying to link an asm and a cpp together using the linker. I'm having trouble with the linker itself even when trying to simply link the main.o file.
<5> rargargh
<5> stupid ****ing..
<6> yes
<4> no
<7> http://www.glocktalk.com/showthread.php?s=&threadid=496760
<4> Anyone here yet who knows a bit about MingW and the linker?
<8> :)
<4> Do you know?
<9> MarchHare, ask your questoin
<9> question
<4> About mingw and the linker.
<4> http://www.noidea128.org/sourcefiles/15913.html
<4> I'm basically getting stupid errors about symbols that I didn't even put in.
<9> try with -f aout
<9> instead of elf
<9> for nasm
<4> ok, let me try that
<4> Nope. It doesn't recognize the aout format for an obj file.
<4> elf works for that...
<9> i use aout format to link nasm obj with gcc's ones
<4> I'm in windows.
<9> rah, ok
<4> voider, you use nasm a lot, then?
<9> maybe it changes something
<9> not a lot
<4> Do you know how to use C with Nasm?
<9> yes
<4> I'm pretty much trying to call the C++ function from a nasm ***embled file.
<4> The errors I get are mundane, like it can't find main, for some reason.
<9> so you use the GLOBAL keywork to export your asm functions?
<4> I'm using extern in my asm so that I can call _main (the C++ function)
<9> then in your c/c++ file, do an extern "C" void function();
<4> My entry point is in the ASM
<9> ok
<9> do you declare _main in your c++ file as extern "C"?
<4> How do I declare int main(void) to be C style?
<9> as your probably know, if you don't, the c++ compiler will mangle symbol
<4> G++ adds the underscore
<4> The only mangling (that I can see) is that underscore
<9> ? ok
<9> maybe
<4> (Nope, I already changed my batch file to Gcc from G++. Same effect.
<9> the mangling occurs if you use a c++ compiler



<4> Did you read that URL?
<9> i overlooked it
<4> The URL has the full source code for both files as well as the problem I'm having. All 5 lines of source code.
<4> http://www.noidea128.org/sourcefiles/15913.html
<4> The source basically is just return 0
<4> Asm file enters at start: call _main
<4> main just returns 0 and goes back to caller.
<4> the asm just returns to caller
<4> Technically, I should just be able to link to only main.o with the starting symbol of _main, it should work.
<4> If I try to link both, and set my starting symbol to start, it whines about that not being found and sets the start point to some default value.
<4> However, neither of them work, both give the same crap about _alloca not being found (where does this come from? My code didn'
<4> t even mention a symbol called _alloca)
<7> Any ideas, voider?
<4> Hmmm, he kind of vanished.
<7> http://groups.google.com/groups?hl=en&q=undefined%20reference%20to%20%60_alloca'&btnG=Google+Search&sa=N&tab=wg
<9> i'm still present
<9> but i'm slppey
<9> sleepy
<9> let me read what you wrote
<7> :)
<4> So _alloca is a bug in mingw
<9> i had an issue close to this when i was using djgpp + nasm
<9> nasm, or djgpp, i dont'e remember, added __ or _ before symbols
<7> djgpp uses mingw
<7> iirc
<9> i know they are both based on gcc
<9> but djgpp is for dos
<7> Oh wait
<7> dev-c++ uses mingw32
<7> iirc
<9> yea
<7> I don't know what djgpp uses
<7> You're right, yah
<4> Ok, that got rid of that _alloca thing.
<4> I did clear this up.
<7> No you didn't, we hate you
<4> I'm trying to call C fn int main(void) from my asm program.
<4> Ok, now the linker is whining about not being able to find symbol main in my asm object, when I clearly told it to enter at "start"
<7> extern c or something?
<4> D:\Desktop>ld entry.o -e start -o a.exe
<4> ld: warning: cannot find entry symbol start; defaulting to 00401000
<4> entry.o: In function `main':
<4> entry.asm:(.text+0x1): undefined reference to `main'
<4> Wait, I missed something
<4> give me a second.
<4> Ok, this is what I get now. Note that I already did that _alloca fix.
<4> D:\Desktop>ld main.o entry.o -e start -o a.exe
<4> ld: warning: cannot find entry symbol start; defaulting to 00401000
<4> main.o:main.cpp:(.text+0x27): undefined reference to `_alloca'
<4> main.o:main.cpp:(.text+0x2c): undefined reference to `__main'
<9> check with objdump
<9> to see if the symbol is defined as expected
<9> i guess mingw comes with objdump?
<4> It does
<4> _alloca is at 0x0000
<4> Which is should be, it's null.
<4> There's two mains... _main and ___main
<4> the three _ one is null
<9> hum k
<9> hmm, need to sleep
<9> good luck
<4> The only symbol that isn't null is _main, at 0x00006
<10> what does this mean error: non-lvalue in ***ignment
<11> that you're ***igning something that cannot be ***igned to
<12> you're trying to ***ign to something that doesn't want to be ***igned to
<11> 10 = 30;
<13> To bison
<12> heheh
<12> been trying to figure out yacc
<13> (I was afraid nobody would get it)
<12> not going so quickly
<14> hi


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c++
or
Go to some related logs:

What is the smallest continent?
#AllNiteCafe
play vaw file +C++
quotes bhagwan shree rashneesh
Fatal error: Call to undefined function curdate
#linux
#linux
xfce + permit root login + xubuntu
taghana
SIOCSIFFLAGS Invalid Arguments



Home  |  disclaimer  |  contact  |  submit quotes