![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#21 |
|
Programmer
Join Date: Aug 2005
Location: England
Posts: 37
Rep Power: 0
![]() |
Thankyou much appreciated !
These errors are occuring during initialisation of the application... Have even tried a simple "Hello world" with similair problems.... but like ya say will try a catchment block ... but if it fails to initialise would it still through the error? (Dawei, i like your piece on polymorphism being a cross dressing parrot, very humourous !! (excellent read to)) |
|
|
|
|
|
#22 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
If "Hello, world!" gives you problems, but only on one PC, I recommend uninstalling and reinstalling the .NET framework and Visual Studio.
|
|
|
|
|
|
#23 |
|
Programmer
Join Date: Aug 2005
Location: England
Posts: 37
Rep Power: 0
![]() |
Really .... Is it the compiler do ya think???
"Hello world!" for example will through an error on all bar my own machine! (Have compiled it to .exe - have even tryed including it into a "setup" program) to be honest im not kean on VS.net do you have any better recommendations? |
|
|
|
|
|
#24 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Well, you could always go with straight C++.
|
|
|
|
|
|
#25 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
If you're using .NET, you're actually adding one variable to the mix. If you have two Intel machines running XP, you shouldn't have a problem if you use a C++ compiler blowing out native code. Bear in mind, however, that the processors in the two machines aren't necessarily just alike. One may have an expanded instruction set of one sort or another. One of the things you get to do in some IDEs (or by command line arguments) is to ask the compiler to generate code that might be specific to a more powerful processor, at the expense of portability to a less powerful one. Check your setting for the type of code to be generated and go for the least common denominator.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#26 | |
|
Caffeinated Neural Net
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 925
Rep Power: 4
![]() |
Quote:
Every machine has its own hardware. First and foremost, you have different CPUs with radically different architectures, meaning they have different (even though often equivalent) machine instructions, they access memory differently (little-endian vs. big-endian byte ordering, memory alignment, amount of addressable memory), and other capabilities. Then you have the supporting hardware, such as the motherboard chipset and all peripherals. When I was younger, I had a computer based around Motorola's 68000 microprocessor. After I'd had the machine for some years, a friend pointed out his laser printer used a 68000 as well- it's essentially the same brain in different bodies; while both would understand the same machine instructions, code written for one would not work on the other. Then you've got the issue of the operating system, if one exists. To do a task under Windows will require different code than under DOS or Linux, even on the same machine. This is where languages like Java come in. Java code is essentially code targeted at a machine that doesn't actually exist, and the 'Java Virtual Machine' that you install to run Java programs is really just an emulator for this imaginary machine. The designers came up with a specification for the machine, code libraries, etc, and in theory, any compliant virtual machine should execute the code in the same manner. Of course, this is the ideal situation; in the real world, it sometimes doesn't work quite so smoothly.
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp |
|
|
|
|
|
|
#27 |
|
Programmer
Join Date: Aug 2005
Location: England
Posts: 37
Rep Power: 0
![]() |
So when emulation comes into play this would be the adpater that DaWei mentioned..????
So am i right in assuming (Is this correct that): A program I.e Messenger that has been downloaded of the net.. when you click its icon, firstly to ensure compatability it would contain an adapter containing most commonly used instruction sets for diffrent machines (Gets the spark that dawei mentioned) which would enable the main program in its execution... the main program would be of a standardized code that the devolepers would know works and have tested on a variety of diffrent target platforms ?? So I would assume then that emulation to diffrent O/s`s and machines would be a very advanced form of a an adapter I.e an P.c to an Amiga for example? Just a thought but is this correct: Some computers architecture and the way instruction sets are dealt with there in would be more inept at running certain o/s`s (i take the intel badge and designed for WinXp comes into play here) so would this mean that as intel and Windows seem to be linked, that Windows would be more designed for Intel`s architecture not AMD`s and AMD would have compatibilty issues (Hence the instability sometimes)?? Last edited by CodeJunkie; Aug 18th, 2005 at 7:55 AM. |
|
|
|
|
|
#28 | |||
|
Caffeinated Neural Net
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 925
Rep Power: 4
![]() |
Quote:
To apply it to software, if the software is not meant to run on a particular machine, then it cannot run on that machine under normal circumstances. You need something that sits between the program and the machine, and 'translates' it. Whether you call this an emulator, adapter, virtual machine, or something else is a moot point; the principle is the same. This is the kind of portability that Java aspires to. There is another kind of portability, however. This is source code portability. When you write so-called portable code, this means you can compile it on different machines, creating a separate version of the program for each machine. Since some languages (notably C and C++) have certain standards regarding how things work and what library functions are part of the standard, regardless of what the platform is. Of course, in the real world, you often need to make use of features specific to the machine or OS, or at least use features that aren't standardized. Things like graphics, sound, and sockets programming fall into this category, but you can still try to isolate these parts of your program from the rest, making it easier to port to another system. Finally, to get back on topic, assembly is NOT a language that lends itself in any way to portability. Assembly, by definition, is tightly coupled to the machine architecture. Yes, there are assemblers that can generate code for diferent platforms, but these are almost always on the same hardware. An example would be NASM's ability to generate code for DOS, Win32, and Linux. Quote:
Quote:
There are some other differences between the chips, but most of these will not affect the code in a functional manner. Examples might be a given instruction executing faster on one chip than another, sizeor organization of the on-chip cache (affecting memory access speeds), or how one might be able to execute more instructions in parallel than another. None of these will prevent the code from working, but might affect how quickly it runs.
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp |
|||
|
|
|
|
|
#29 |
|
Programmer
Join Date: Aug 2005
Location: England
Posts: 37
Rep Power: 0
![]() |
thanx ... Much clearer...
Perhaps im opening up a can of worms here but i have to ask... how can a chip offer diffrent instructions.. i thought that a processor simply deals with 1s and 0s And/Or/Not how do some chips offer more?? |
|
|
|
|
|
#30 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Built in math processes, interface to math coprocessors, internal RAM or ROM or IO, enhanced addressing modes, special multimedia instructions, a plethora of things. I highly recommend Google and reading, if you're truly interested. There is a ton of information available to you without us undertaking to personally tutor you in forum posts and responses.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|