Pros:
- One environment
- Speed. Native environment vs MSys is much, much faster.
- Building non-Linux things on Linux means transferring them from one machine to another.
su postgres createuser -SDRPE user createdb -E UTF8 -O user database
#"e[1~": history-search-backward #"e[4~": set-mark
ID ICON "path/to/my.ico"...the ID can be anything. It doesn't matter unless it is referred in the code.
windres resource.rc -O coff -o resource.oInclude resource.o along with other object files while linking, e.g.,
g++ -o app obj1.o obj2.o resource.o
1 VERSIONINFO FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904E4" BEGIN VALUE "CompanyName", "Company name" VALUE "FileDescription", "Application name" VALUE "FileVersion", "1.0" VALUE "InternalName", "my_app" VALUE "LegalCopyright", "Copyright info" VALUE "OriginalFilename", "my_app.exe" VALUE "ProductName", "My App" VALUE "ProductVersion", "1.0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END
lua_Debug lua_info; lua_getstack(L, 0, &lua_info); lua_getinfo(L, "n", &lua_info); string name = lua_info.name;Opposite to lua_register:
lua_pushnil(L); lua_setglobal(L, name.c_str());stack_dump in C++ flavour ;)
static void stack_dump (lua_State *L) { int top = lua_gettop(L); for(int i = 1; i <= top; i++) { int t = lua_type(L, i); switch(t) { case LUA_TSTRING: cout << "'" << lua_tostring(L, i) << "'"; break; case LUA_TBOOLEAN: cout << (lua_toboolean(L, i) ? "true" : "false"); break; case LUA_TNUMBER: cout << lua_tonumber(L, i); break; default: cout << lua_typename(L, t); break; } cout << " "; } cout << endl; }
./configureAdd -lpthread to LIBS section in gettext-runtime/src/Makefile and gettext-tools/src/Makefile.
make; make installBe happy.
sed: -e expression #2, char 32: Extra characters after commandFortunately, I've found a solution in the internet:
diff -ur tmp/libiconv-1.12/windows/windres-options src/libiconv-1.12/windows/windres-options --- tmp/libiconv-1.12/windows/windres-options 2007-05-27 19:42:10 +0100 +++ src/libiconv-1.12/windows/windres-options 2008-05-28 13:41:03 +0100 @@ -14,20 +14,29 @@ fi version="$1" # something like 2.0 or 2.17 or 2.17.3 or 2.17.3-pre3 -sed_extract_major='/^[0-9]/{s/^([0-9]*).*/1/p;q} +sed_extract_major=' +/^[0-9]/{ + s/^([0-9]*).*/1/p + q +} a 0 -q ' -sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]([0-9]*).*/1/p;q} +sed_extract_minor=' +/^[0-9][0-9]*[.][0-9]/{ + s/^[0-9]*[.]([0-9]*).*/1/p + q +} a 0 -q ' -sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]([0-9]*).*/1/p;q} +sed_extract_subminor=' +/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{ + s/^[0-9]*[.][0-9]*[.]([0-9]*).*/1/p + q +} a 0 -q ' {Credit goes to Keith Marshall.
Toshiba U300-154 |
/* initialize timer interrupt */ void init_isr_timers() { /* OC1A/OC1B disconnected */ TCCR1A = 0; /* CTC mode, top in OCR1A / Timer clock = CLK/1024 */ TCCR1B = (1<<WGM12)|(1<<CS12)|(1<<CS10); /* set OCR1A top value for 20Hz (10 periods in one second) */ /* 0x0168 for CPU @ 7.3728MHz */ OCR1A = 0x0168; /* enable Timer/Counter 1 interrupt */ TIMSK = (1<<OCIE1A); } /* timer/counter 1 interrupt handler */ ISR(TIMER1_COMPA_vect) { /* Ohhh, lovely! :) */ } int main() { /* initialize timer interrupt */ init_isr_timers(); /* enable interrupts */ sei(); /* main loop */ for(;;) {} }
// begin the session session_start(); // create an array $my_array = array('blonde', 'girls', 'are', 'stupid'); // put the array in a session variable $_SESSION['truth'] = $my_array;
RESOURCE_ICON_APP ICON DISCARDABLE "../files/app.ico"Project > Properties > C/C++ Build > Settings > Tool Settings > MinGW C++ Linker > Miscellaneous > Other objects:
Release\source\resource.oProject > Properties > C/C++ Build > Settings > Build Steps > Pre-build steps > Command:
windres -i ..sourceresource.rc -o sourceresource.o
pexports library.dll > library.def dlltool -D library.dll -d library.def -l library.dll.aNote, that if dll was built by different environment than gcc, this probably will not work because of the naming conventions. If this the case, read here.