Try "-L../libsophia/build -lsophia" (without the quotes).
- Viewing Profile: Reputation: bradbobak
Community Stats
- Group Members
- Active Posts 94
- Profile Views 1,295
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
User Tools
Contacts
bradbobak hasn't added any contacts yet.
#5025653 Making a Static Lib in Linux
Posted by bradbobak
on 25 January 2013 - 09:33 PM
#4998346 VS 2012 iostream syntax error!
Posted by bradbobak
on 06 November 2012 - 11:08 PM
#4987565 C++ -- Undinitialized Variables
Posted by bradbobak
on 06 October 2012 - 08:46 PM
#4959191 C++
Posted by bradbobak
on 14 July 2012 - 11:20 PM
Object *Array[4]; Array[4] = new Object[5];
You would be using memory outside of Array (Array[4] is one past the end).
If you have
std::vector< Object * > Array(4, 0); Array[4] = new Object[5];
You would again be using memory outside the array.
Otherwise if you have the first and do assign to a Array[X] where X is in bounds, all the other Array elements remain unchanged.
#4943257 OS and application interaction questions
Posted by bradbobak
on 25 May 2012 - 09:07 AM
But how does the Scheduler actually interrupt the application when it has full control?
Is there a timer that interrupts the CPU every 10ms unless it is reset, triggering some Scheduler code?
On x86, you can set up a timer interrupt to trigger every so often.
Does the OS before launching a new thread set the CPU to operate in "user mode" limiting some instructions?
On x86, most os's will set the 'ring level' to 3, limiting some cpu commands (like loading the page table, 'hlt' ing the cpu, etc., making some io ports unavailable)
How does the application allocate memory without hazard, through the memory controller?
Generally, it sends a 'syscall' irq, where when the os recieves it, it maps some memory for the application, possibly adding a page table entry.
How can the OS restrict the application to its own address space, user mode, can't the application disable "user mode" itself?
On x86, the 'kernel' sets the process to ring level 3, limiting many commands. Restricting the address space is basically done by the kernel setting up a unique page table for the process itself before handing over control to the process.
www.osdev.net may have documentation that will help you out.
#4936199 c++ syntax challenge!
Posted by bradbobak
on 30 April 2012 - 04:22 PM
struct x
{
void (*func)();
static void my_func() { }
};
int main()
{
x xx;
xx.func = x::my_func;
xx.func();
}
#4906348 #pragma once not working?
Posted by bradbobak
on 26 January 2012 - 01:44 AM
#4902262 c++ : Deleting object (not just its pointer) from vector
Posted by bradbobak
on 13 January 2012 - 02:12 AM
#4900216 Win32 disable or get around key repeating (only check if up or down once)
Posted by bradbobak
on 05 January 2012 - 09:31 PM
#4896747 Reading pixels from bmp
Posted by bradbobak
on 23 December 2011 - 01:41 AM
... int i = 0;
void *pixel = malloc(size);
while(feof(f) == 0)
{
i++;
fread(&pixel,sizeof(pixel),1,f);
cout << (int)pixel << endl;
};
...
You are telling fread to read into the location of the pointer variable itself. sizeof(pixel) is (probably) 4 or 8, so you are reading that many bytes each iteration.
Perhaps you want to do a 'int num_read = fread(pixel, 1, size, f);' instead of the loop. (you said each pixel is 8 bits).
#4894446 Saving File Help
Posted by bradbobak
on 16 December 2011 - 04:38 AM
One way to do it is:
std::stringstream ss; ss << "Level/Chunk" << loop1 << "_" << loop2; std::ofstream file(ss.str().c_str());
- Home
- » Viewing Profile: Reputation: bradbobak

Find content