Error compiling this example code of libcurl

Its an example code to download a file and show gtk window..
http://curl.haxx.se/libcurl/c/curlgtk.html
I get this error:-
shadyabhi@ArchLinux /tmp $ gcc curlgtk.c `pkg-config --libs --cflags libcurl`
curlgtk.c:13:21: fatal error: gtk/gtk.h: No such file or directory
compilation terminated.
shadyabhi@ArchLinux /tmp $
Then I tried :-
shadyabhi@ArchLinux /tmp $ gcc curlgtk.c `pkg-config --libs --cflags libcurl` -I /usr/include/gtk-2.0/
In file included from /usr/include/gtk-2.0/gdk/gdk.h:32:0,
from /usr/include/gtk-2.0/gtk/gtk.h:32,
from curlgtk.c:13:
/usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30:21: fatal error: gio/gio.h: No such file or directory
compilation terminated.
shadyabhi@ArchLinux /tmp $
Whats the issue?
The complete code:-
/* Copyright (c) 2000 David Odin (aka DindinX) for MandrakeSoft */
/* an attempt to use the curl library in concert with a gtk-threaded application */
#include <stdio.h>
#include <gtk/gtk.h>
#include <curl/curl.h>
#include <curl/types.h> /* new for v7 */
#include <curl/easy.h> /* new for v7 */
GtkWidget *Bar;
size_t my_write_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
return fwrite(ptr, size, nmemb, stream);
size_t my_read_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
return fread(ptr, size, nmemb, stream);
int my_progress_func(GtkWidget *bar,
double t, /* dltotal */
double d, /* dlnow */
double ultotal,
double ulnow)
/* printf("%d / %d (%g %%)\n", d, t, d*100.0/t);*/
gdk_threads_enter();
gtk_progress_set_value(GTK_PROGRESS(bar), d*100.0/t);
gdk_threads_leave();
return 0;
void *my_thread(void *ptr)
CURL *curl;
CURLcode res;
FILE *outfile;
gchar *url = ptr;
curl = curl_easy_init();
if(curl)
outfile = fopen("test.curl", "w");
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_write_func);
curl_easy_setopt(curl, CURLOPT_READFUNCTION, my_read_func);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, my_progress_func);
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, Bar);
res = curl_easy_perform(curl);
fclose(outfile);
/* always cleanup */
curl_easy_cleanup(curl);
return NULL;
int main(int argc, char **argv)
GtkWidget *Window, *Frame, *Frame2;
GtkAdjustment *adj;
/* Must initialize libcurl before any threads are started */
curl_global_init(CURL_GLOBAL_ALL);
/* Init thread */
g_thread_init(NULL);
gtk_init(&argc, &argv);
Window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
Frame = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(Frame), GTK_SHADOW_OUT);
gtk_container_add(GTK_CONTAINER(Window), Frame);
Frame2 = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(Frame2), GTK_SHADOW_IN);
gtk_container_add(GTK_CONTAINER(Frame), Frame2);
gtk_container_set_border_width(GTK_CONTAINER(Frame2), 5);
adj = (GtkAdjustment*)gtk_adjustment_new(0, 0, 100, 0, 0, 0);
Bar = gtk_progress_bar_new_with_adjustment(adj);
gtk_container_add(GTK_CONTAINER(Frame2), Bar);
gtk_widget_show_all(Window);
if (!g_thread_create(&my_thread, argv[1], FALSE, NULL) != 0)
g_warning("can't create the thread");
gdk_threads_enter();
gtk_main();
gdk_threads_leave();
return 0;

Your error is unrelated to curl. You're not properly linking against gtk
gcc curlgtk.c $(pkg-config --libs --cflags gtk+-2.0 libcurl)

Similar Messages

  • Error when using example code

    Hi all,
    im trying to create a program for communication over a LAN network with a spectrum analyser.
    when i use a standard example code i get errors like this one:
    [Linker error] undefined reference to `viOpenDefaultRM@4'
    did i made a fault in linking?

    DAV C++ uses a GCC based compiler. The VISA DLL is compiled with MSVC. This will cause a problem with the calling convertions used and expected.
    Basiclly the visa DLL uses 'viOpenDefaultRM' but the GCC expects viOpenDefaultRM@4, and thus can't find it in the DLL. You can solve this manually.
    The basic steps are:
    1. Generate a .def file from the DLL for example with pexports.
    2. correct the .def file so all the functions have the correct decorations as expected by GCC.
    3. Create a new import library,
    For more infomation see this post about the same issue with NI-DAQmx
    An other option would be to use the Visual Studio 2005 express editions?
    And in some configuration you will need to buy a license to use NI-VISA: http://www.ni.com/visa/license.htm
    Hope this helps
    Karsten

  • How to use this example code in Flash AS3?

    Hi,
    How can I use this AS3 code in my Flash CS4 document? The following code is in the below link:
    http://pv3d.org/2009/12/18/tweenmax-tweening-a-timeline-advanced-tweening/#
    Please help.
    Thanks.

    Hi,
    It is working quite nice. I want to use the same code but instead of as "Document Class" I want to put that code in a first key frame of my project. I tried the following but gets an error:
    The error is : 1131: Classes must not be nested.
    And the following code  I tried is:
        import com.greensock.TimelineMax;
        import com.greensock.TweenMax;
        import com.greensock.easing.Linear;
        import com.greensock.easing.Quart;
        import flash.display.Sprite;
         * @author John Lindquist
        [SWF(width="900", height="480", frameRate="31")]
        class EasingATimeline extends Sprite
            private var square:Sprite;
            private static const STEP_DURATION:Number = 1;
            public function EasingATimeline()
                square = new Sprite();
                square.graphics.beginFill(0xcc0000);
                square.graphics.drawRect(0, 0, 50, 50);
                square.graphics.endFill();
                square.x = 100;
                square.y = 50;
                addChild(square);
                //set all the eases of your steps to Linear.easeNone
                var step1:TweenMax = TweenMax.to(square, STEP_DURATION, {x: 700, y: 50, ease: Linear.easeNone});
                var step2:TweenMax = TweenMax.to(square, STEP_DURATION, {x: 700, y: 350, ease: Linear.easeNone});
                var step3:TweenMax = TweenMax.to(square, STEP_DURATION, {x: 100, y: 350, ease: Linear.easeNone});
                var step4:TweenMax = TweenMax.to(square, STEP_DURATION, {x: 100, y: 50, ease: Linear.easeNone});
                var timeline:TimelineMax = new TimelineMax();
                timeline.append(step1);
                timeline.append(step2);
                timeline.append(step3);
                timeline.append(step4);
                //pause your timeline
                timeline.pause();
                //tween your timeline with whatever ease you want
                TweenMax.to(timeline, timeline.totalDuration, {currentTime: timeline.totalDuration, ease: Quart.easeInOut, repeat: -1});
    Please help me to solve this problem.
    Thanks.

  • Can't find the error on this small code :S

    Hi , i've just compiled this code and i can't find what is wrong! :(
    The compiler is ok, but the output print its not what i was expect.
    If u insert 121 (capicua) the answer is: This number its not a capicua :S
    what is wrong?
    thanks!!
    Note: Don't create another code plz.
    import java.io.*;
    public class Capicua {
         public static void main (String[] args) throws Exception {
              int digit, num;
              int inverted = 0;
                   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                   System.out.print(" Insert number: ");
                   num=Integer.parseInt(br.readLine().trim());
                   while(num > 0) {
                   digit = num % 10;
                   num = num /10;
                   inverted = inverted * 10 + digit;
                   if(num == inverted) {
                        // to be capicua the number inserted must
                        //be equals to the inverted
                        System.out.println("Its Capicua!");      
                   }else{
                        System.out.println("This number is not a Capicua!");
    }

    Please use code tags (see button above posting box) when posting code. It makes it much easier to read.
    So, it appears that capicua means palindrome--the number reads the same backwards and forwards. Is that correct?
    There are ways of doing this without converting the 121 to a number, but I won't explain that unless you want.
    I think your problem is this line:
    if (num == inverted)
    You have changed "num" within your while loop. Therefore, num is no longer the original input 121.
    Try adding println statements like this to watch what happens:
    while(num > 0) {
      digit = num % 10;
      num = num /10;
      inverted = inverted * 10 + digit;
      System.out.println("digit = " + digit);
      System.out.println("num = " + num);
      System.out.println("inverted = " + inverted);
    }

  • Error compiling this code

    Could you tell me what i'm doing wrong with this code? I posted earlier for inputting char into a variable, but the post just got too long.
    I've tried below with code, but I can't get it right. Can you help me..?
    import java.io.*;
    public class Goals {
    public static void main (String args[]) {
    System.out.println("Enter time and tide:");
    InputStreamReader reader = new InputStreamReader (System.in);
    char ch = reader.read(char); // trying to read character from keyboard
    System.out.println("the character" +ch);
    This is my error here:
    Goals.java:13: '.class' expec
    char ch = reader.read(char);
    ^
    Goals.java:13: ')' expected
    char ch = reader.read(char);
    ^
    thank you...
    yash

    The read method that you want to use does not accept any argument, so the syntax you want is char ch = reader.read();
    The first error is caused because the compiler is not expecting to see the reserved word "char" at that point. It knows that the only way the code would be valid is that char was followed by .class, so it suggests it. The second error seems to be a ripple effect of the first one and gets fixed when you fix the first one.
    Once you fix that error you get another, warning you about loss of precision. This is because the read() method returns an int and you are trying to assign an int in a char, while it's well known that there are plenty of integer values that don't fit in a char. Why does Reader.read() return an int instead of char? Because it needs a way to signal the end of the stream. In a normal case the read method returns the character that was read, but -1 if the end of the stream has been reached.
    One way to fix this would be casting the int value to char, which erroneously interpretes the end of the stream as a char too:
    char ch = (char) reader.read();

  • Got error while compiling this source code?

    [code =java]package com.agent.client.movies;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    import java.util.ArrayList;
    public interface DataSourceMovies extends Remote{
    ArrayList<String[]> getAllMovies() throws RemoteException;
    ArrayList<String[]> findMoviesByYear( int year) throws RemoteException;
    ArrayList<String[]> findMoviesByDirector(String director) throws RemoteException;
    ArrayList<String[]> findMoviesByGenre(String genre) throws RemoteException;
    ArrayList<String[]> findMoviesByName(String name) throws RemoteException;
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * MovieClient.java
    * Created on Apr 24, 2012, 10:49:58 AM
    package com.agent.client.movies;
    import com.agent.client.songs.SongsClient;
    import com.agent.client.Utility;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.StringTokenizer;
    import javax.naming.InitialContext;
    import javax.swing.DefaultListModel;
    import javax.swing.JOptionPane;
    import javax.swing.table.DefaultTableModel;
    public class MovieClient extends javax.swing.JFrame {
    ArrayList<String> mappedips = new ArrayList<String>();
    DefaultListModel<String> modelmsg = new DefaultListModel<String>();
    InitialContext ctx;
    /** Creates new form MovieClient */
    public MovieClient(String ips) {
    setLookAndFeel();
    initComponents();
    Utility.setInCenter(this);
    StringTokenizer stok = new StringTokenizer(ips, ":");
    while(stok.hasMoreTokens())
    mappedips.add(stok.nextToken());
    public void setLookAndFeel(){
    /* Set the Nimbus look and feel */
    //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
    * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
    try {
    for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
    if ("Nimbus".equals(info.getName())) {
    javax.swing.UIManager.setLookAndFeel(info.getClassName());
    break;
    } catch (ClassNotFoundException ex) {
    java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
    java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
    java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
    java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    //</editor-fold>
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
    buttonGroup1 = new javax.swing.ButtonGroup();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jPanel2 = new javax.swing.JPanel();
    btclose = new javax.swing.JButton();
    jPanel3 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    jPanel8 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    txtkey = new javax.swing.JTextField();
    btsearch = new javax.swing.JButton();
    jPanel9 = new javax.swing.JPanel();
    rdbyname = new javax.swing.JRadioButton();
    rdbydirector = new javax.swing.JRadioButton();
    rdbygenre = new javax.swing.JRadioButton();
    rdbyyear = new javax.swing.JRadioButton();
    jPanel5 = new javax.swing.JPanel();
    jPanel6 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    lstMessages = new javax.swing.JList(modelmsg);
    jPanel7 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    tabmovies = new javax.swing.JTable();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setMinimumSize(new java.awt.Dimension(500, 500));
    jLabel1.setFont(new java.awt.Font("Simplified Arabic", 1, 24));
    jLabel1.setForeground(new java.awt.Color(0, 102, 204));
    jLabel1.setText("Mobile Agent: Find Movie Information");
    jPanel1.add(jLabel1);
    getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_START);
    btclose.setText("Close");
    btclose.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    btcloseActionPerformed(evt);
    jPanel2.add(btclose);
    getContentPane().add(jPanel2, java.awt.BorderLayout.PAGE_END);
    jPanel3.setLayout(new java.awt.BorderLayout());
    jPanel4.setLayout(new java.awt.GridLayout(2, 1));
    jLabel2.setText("Key");
    btsearch.setText("Search");
    btsearch.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    btsearchActionPerformed(evt);
    javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
    jPanel8.setLayout(jPanel8Layout);
    jPanel8Layout.setHorizontalGroup(
    jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel8Layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(txtkey, javax.swing.GroupLayout.PREFERRED_SIZE, 482, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
    .addComponent(btsearch)
    .addContainerGap(130, Short.MAX_VALUE))
    jPanel8Layout.setVerticalGroup(
    jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel8Layout.createSequentialGroup()
    .addGap(14, 14, 14)
    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jLabel2)
    .addComponent(txtkey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(btsearch))
    .addContainerGap(13, Short.MAX_VALUE))
    jPanel4.add(jPanel8);
    buttonGroup1.add(rdbyname);
    rdbyname.setSelected(true);
    rdbyname.setText("By name");
    buttonGroup1.add(rdbydirector);
    rdbydirector.setText("By director");
    buttonGroup1.add(rdbygenre);
    rdbygenre.setText("By genre");
    buttonGroup1.add(rdbyyear);
    rdbyyear.setText("By year");
    javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
    jPanel9.setLayout(jPanel9Layout);
    jPanel9Layout.setHorizontalGroup(
    jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel9Layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(rdbyname)
    .addGap(36, 36, 36)
    .addComponent(rdbydirector)
    .addGap(37, 37, 37)
    .addComponent(rdbygenre)
    .addGap(33, 33, 33)
    .addComponent(rdbyyear)
    .addContainerGap(352, Short.MAX_VALUE))
    jPanel9Layout.setVerticalGroup(
    jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel9Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(rdbyname)
    .addComponent(rdbydirector)
    .addComponent(rdbygenre)
    .addComponent(rdbyyear))
    .addContainerGap(20, Short.MAX_VALUE))
    jPanel4.add(jPanel9);
    jPanel3.add(jPanel4, java.awt.BorderLayout.PAGE_START);
    jPanel5.setLayout(new java.awt.BorderLayout());
    jPanel6.setLayout(new java.awt.BorderLayout());
    lstMessages.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102)));
    jScrollPane1.setViewportView(lstMessages);
    jPanel6.add(jScrollPane1, java.awt.BorderLayout.CENTER);
    jPanel5.add(jPanel6, java.awt.BorderLayout.PAGE_END);
    jPanel7.setLayout(new java.awt.BorderLayout());
    tabmovies.setModel(new javax.swing.table.DefaultTableModel(
    new Object [][] {
    new String [] {
    "Name", "Director", "Genre", "Release Year"
    jScrollPane2.setViewportView(tabmovies);
    jPanel7.add(jScrollPane2, java.awt.BorderLayout.CENTER);
    jPanel5.add(jPanel7, java.awt.BorderLayout.CENTER);
    jPanel3.add(jPanel5, java.awt.BorderLayout.CENTER);
    getContentPane().add(jPanel3, java.awt.BorderLayout.CENTER);
    pack();
    }// </editor-fold>//GEN-END:initComponents
    private void btcloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btcloseActionPerformed
    System.exit(0);
    }//GEN-LAST:event_btcloseActionPerformed
    private void btsearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btsearchActionPerformed
    searchMovies();
    }//GEN-LAST:event_btsearchActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btclose;
    private javax.swing.JButton btsearch;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JList lstMessages;
    private javax.swing.JRadioButton rdbydirector;
    private javax.swing.JRadioButton rdbygenre;
    private javax.swing.JRadioButton rdbyname;
    private javax.swing.JRadioButton rdbyyear;
    private javax.swing.JTable tabmovies;
    private javax.swing.JTextField txtkey;
    // End of variables declaration//GEN-END:variables
    private void searchMovies() {
    if(txtkey.getText().trim().length()==0){
    JOptionPane.showMessageDialog(null, "Please enter some words...");
    return;
    for(String ip : mappedips){
    modelmsg.addElement("Looking up node : " + ip);
    DataSourceMovies movies = null;
    try {
    ctx = new InitialContext();
    movies = (DataSourceMovies)ctx.lookup("rmi://" + ip + "/movieserver");
    } catch (Exception e) {
    modelmsg.addElement("Error contacting node...");
    e.printStackTrace();
    break;
    List<String[]> movieslist = null;
    try{
    if(rdbyname.isSelected())
    movieslist = movies.findMoviesByName(txtkey.getText().trim());
    else if(rdbydirector.isSelected())
    movieslist = movies.findMoviesByDirector(txtkey.getText().trim());
    else if(rdbygenre.isSelected())
    movieslist = movies.findMoviesByGenre(txtkey.getText().trim());
    else if(rdbyyear.isSelected()){
    try {
    movieslist = movies.findMoviesByYear(Integer.parseInt(txtkey.getText().trim()));
    } catch (Exception e) {
    JOptionPane.showMessageDialog(null, "Invalid year...");
    return;
    if(movieslist!=null && movieslist.size()>0){
    modelmsg.addElement("Songs found...");
    DefaultTableModel model = (DefaultTableModel) tabmovies.getModel();
    while(model.getRowCount()>0){
    model.removeRow(0);
    tabmovies.revalidate();
    for(String[] moviedata : movieslist)
    model.addRow(moviedata);
    catch(Exception ex) {               
    modelmsg.addElement("Error reading data...");
    break;
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package com.agent.client.movies;
    import com.agent.client.Utility;
    import java.io.DataInputStream;
    import java.io.DataOutputStream;
    import java.net.Socket;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JWindow;
    import javax.swing.SwingConstants;
    public class MovieSplashScreen {
    private javax.swing.JLabel lbimage;
    private javax.swing.JLabel lbloading;
    private javax.swing.JLabel lbmobile;
    private javax.swing.JPanel panelBack;
    public static void main(String[] ar) {
    new MovieSplashScreen().displaySplash(ar[0]);
    public void displaySplash(String mapperip) {
    JWindow window = new JWindow();
    window.getContentPane().add(
    new JLabel("Loading JFrame...", SwingConstants.CENTER));
    window.setSize(525, 240);
    Utility.setInCenter(window);
    panelBack = new javax.swing.JPanel();
    lbimage = new javax.swing.JLabel();
    lbloading = new javax.swing.JLabel();
    lbmobile = new javax.swing.JLabel();
    panelBack.setBackground(new java.awt.Color(255, 255, 255));
    panelBack.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 102), 2));
    panelBack.setLayout(null);
    lbimage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/agent/client/splash.jpg"))); // NOI18N
    panelBack.add(lbimage);
    lbimage.setBounds(250, 20, 250, 180);
    lbloading.setFont(new java.awt.Font("Showcard Gothic", 0, 30)); // NOI18N
    lbloading.setText("Loading...");
    panelBack.add(lbloading);
    lbloading.setBounds(50, 120, 210, 70);
    lbmobile.setFont(new java.awt.Font("Tekton Pro Cond", 0, 24)); // NOI18N
    lbmobile.setForeground(new java.awt.Color(0, 51, 51));
    lbmobile.setText("Mobile Agents 1.0");
    panelBack.add(lbmobile);
    lbmobile.setBounds(30, 20, 230, 40);
    window.add(panelBack, java.awt.BorderLayout.CENTER);
    window.setVisible(true);
    try {
    Thread.sleep(5000);
    } catch (InterruptedException e) {
    Socket client = null;
    try {
    client = new Socket(mapperip,2222);
    } catch (Exception e) {
    JOptionPane.showMessageDialog(null, "Mapping server down...");
    System.exit(0);
    DataInputStream din = null;
    DataOutputStream dout = null;
    String ips = null;
    try {
    din = new DataInputStream(client.getInputStream());
    dout = new DataOutputStream(client.getOutputStream());
    dout.writeUTF("movies");
    ips = din.readUTF();
    } catch (Exception e) {
    JOptionPane.showMessageDialog(null, "Cannot retrieve mappings...");
    e.printStackTrace();
    System.exit(0);
    window.setVisible(false);
    MovieClient sclient = new MovieClient(ips);
    sclient.setVisible(true);
    window.dispose();

    {code = java}package com.agent.client.movies;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    import java.util.ArrayList;
    public interface DataSourceMovies extends Remote{
    ArrayList<String[]> getAllMovies() throws RemoteException;
    ArrayList<String[]> findMoviesByYear( int year) throws RemoteException;
    ArrayList<String[]> findMoviesByDirector(String director) throws RemoteException;
    ArrayList<String[]> findMoviesByGenre(String genre) throws RemoteException;
    ArrayList<String[]> findMoviesByName(String name) throws RemoteException;
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * MovieClient.java
    * Created on Apr 24, 2012, 10:49:58 AM
    package com.agent.client.movies;
    import com.agent.client.songs.SongsClient;
    import com.agent.client.Utility;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.StringTokenizer;
    import javax.naming.InitialContext;
    import javax.swing.DefaultListModel;
    import javax.swing.JOptionPane;
    import javax.swing.table.DefaultTableModel;
    public class MovieClient extends javax.swing.JFrame {
    ArrayList<String> mappedips = new ArrayList<String>();
    DefaultListModel<String> modelmsg = new DefaultListModel<String>();
    InitialContext ctx;
    /** Creates new form MovieClient */
    public MovieClient(String ips) {
    setLookAndFeel();
    initComponents();
    Utility.setInCenter(this);
    StringTokenizer stok = new StringTokenizer(ips, ":");
    while(stok.hasMoreTokens())
    mappedips.add(stok.nextToken());
    public void setLookAndFeel(){
    /* Set the Nimbus look and feel */
    //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
    * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
    try {
    for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
    if ("Nimbus".equals(info.getName())) {
    javax.swing.UIManager.setLookAndFeel(info.getClassName());
    break;
    } catch (ClassNotFoundException ex) {
    java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
    java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
    java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
    java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    //</editor-fold>
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
    buttonGroup1 = new javax.swing.ButtonGroup();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jPanel2 = new javax.swing.JPanel();
    btclose = new javax.swing.JButton();
    jPanel3 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    jPanel8 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    txtkey = new javax.swing.JTextField();
    btsearch = new javax.swing.JButton();
    jPanel9 = new javax.swing.JPanel();
    rdbyname = new javax.swing.JRadioButton();
    rdbydirector = new javax.swing.JRadioButton();
    rdbygenre = new javax.swing.JRadioButton();
    rdbyyear = new javax.swing.JRadioButton();
    jPanel5 = new javax.swing.JPanel();
    jPanel6 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    lstMessages = new javax.swing.JList(modelmsg);
    jPanel7 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    tabmovies = new javax.swing.JTable();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setMinimumSize(new java.awt.Dimension(500, 500));
    jLabel1.setFont(new java.awt.Font("Simplified Arabic", 1, 24));
    jLabel1.setForeground(new java.awt.Color(0, 102, 204));
    jLabel1.setText("Mobile Agent: Find Movie Information");
    jPanel1.add(jLabel1);
    getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_START);
    btclose.setText("Close");
    btclose.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    btcloseActionPerformed(evt);
    jPanel2.add(btclose);
    getContentPane().add(jPanel2, java.awt.BorderLayout.PAGE_END);
    jPanel3.setLayout(new java.awt.BorderLayout());
    jPanel4.setLayout(new java.awt.GridLayout(2, 1));
    jLabel2.setText("Key");
    btsearch.setText("Search");
    btsearch.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    btsearchActionPerformed(evt);
    javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
    jPanel8.setLayout(jPanel8Layout);
    jPanel8Layout.setHorizontalGroup(
    jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel8Layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(txtkey, javax.swing.GroupLayout.PREFERRED_SIZE, 482, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
    .addComponent(btsearch)
    .addContainerGap(130, Short.MAX_VALUE))
    jPanel8Layout.setVerticalGroup(
    jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel8Layout.createSequentialGroup()
    .addGap(14, 14, 14)
    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jLabel2)
    .addComponent(txtkey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(btsearch))
    .addContainerGap(13, Short.MAX_VALUE))
    jPanel4.add(jPanel8);
    buttonGroup1.add(rdbyname);
    rdbyname.setSelected(true);
    rdbyname.setText("By name");
    buttonGroup1.add(rdbydirector);
    rdbydirector.setText("By director");
    buttonGroup1.add(rdbygenre);
    rdbygenre.setText("By genre");
    buttonGroup1.add(rdbyyear);
    rdbyyear.setText("By year");
    javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
    jPanel9.setLayout(jPanel9Layout);
    jPanel9Layout.setHorizontalGroup(
    jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel9Layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(rdbyname)
    .addGap(36, 36, 36)
    .addComponent(rdbydirector)
    .addGap(37, 37, 37)
    .addComponent(rdbygenre)
    .addGap(33, 33, 33)
    .addComponent(rdbyyear)
    .addContainerGap(352, Short.MAX_VALUE))
    jPanel9Layout.setVerticalGroup(
    jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel9Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(rdbyname)
    .addComponent(rdbydirector)
    .addComponent(rdbygenre)
    .addComponent(rdbyyear))
    .addContainerGap(20, Short.MAX_VALUE))
    jPanel4.add(jPanel9);
    jPanel3.add(jPanel4, java.awt.BorderLayout.PAGE_START);
    jPanel5.setLayout(new java.awt.BorderLayout());
    jPanel6.setLayout(new java.awt.BorderLayout());
    lstMessages.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102)));
    jScrollPane1.setViewportView(lstMessages);
    jPanel6.add(jScrollPane1, java.awt.BorderLayout.CENTER);
    jPanel5.add(jPanel6, java.awt.BorderLayout.PAGE_END);
    jPanel7.setLayout(new java.awt.BorderLayout());
    tabmovies.setModel(new javax.swing.table.DefaultTableModel(
    new Object [][] {
    new String [] {
    "Name", "Director", "Genre", "Release Year"
    jScrollPane2.setViewportView(tabmovies);
    jPanel7.add(jScrollPane2, java.awt.BorderLayout.CENTER);
    jPanel5.add(jPanel7, java.awt.BorderLayout.CENTER);
    jPanel3.add(jPanel5, java.awt.BorderLayout.CENTER);
    getContentPane().add(jPanel3, java.awt.BorderLayout.CENTER);
    pack();
    }// </editor-fold>//GEN-END:initComponents
    private void btcloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btcloseActionPerformed
    System.exit(0);
    }//GEN-LAST:event_btcloseActionPerformed
    private void btsearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btsearchActionPerformed
    searchMovies();
    }//GEN-LAST:event_btsearchActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btclose;
    private javax.swing.JButton btsearch;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JList lstMessages;
    private javax.swing.JRadioButton rdbydirector;
    private javax.swing.JRadioButton rdbygenre;
    private javax.swing.JRadioButton rdbyname;
    private javax.swing.JRadioButton rdbyyear;
    private javax.swing.JTable tabmovies;
    private javax.swing.JTextField txtkey;
    // End of variables declaration//GEN-END:variables
    private void searchMovies() {
    if(txtkey.getText().trim().length()==0){
    JOptionPane.showMessageDialog(null, "Please enter some words...");
    return;
    for(String ip : mappedips){
    modelmsg.addElement("Looking up node : " + ip);
    DataSourceMovies movies = null;
    try {
    ctx = new InitialContext();
    movies = (DataSourceMovies)ctx.lookup("rmi://" + ip + "/movieserver");
    } catch (Exception e) {
    modelmsg.addElement("Error contacting node...");
    e.printStackTrace();
    break;
    List<String[]> movieslist = null;
    try{
    if(rdbyname.isSelected())
    movieslist = movies.findMoviesByName(txtkey.getText().trim());
    else if(rdbydirector.isSelected())
    movieslist = movies.findMoviesByDirector(txtkey.getText().trim());
    else if(rdbygenre.isSelected())
    movieslist = movies.findMoviesByGenre(txtkey.getText().trim());
    else if(rdbyyear.isSelected()){
    try {
    movieslist = movies.findMoviesByYear(Integer.parseInt(txtkey.getText().trim()));
    } catch (Exception e) {
    JOptionPane.showMessageDialog(null, "Invalid year...");
    return;
    if(movieslist!=null && movieslist.size()>0){
    modelmsg.addElement("Songs found...");
    DefaultTableModel model = (DefaultTableModel) tabmovies.getModel();
    while(model.getRowCount()>0){
    model.removeRow(0);
    tabmovies.revalidate();
    for(String[] moviedata : movieslist)
    model.addRow(moviedata);
    catch(Exception ex) {
    modelmsg.addElement("Error reading data...");
    break;
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package com.agent.client.movies;
    import com.agent.client.Utility;
    import java.io.DataInputStream;
    import java.io.DataOutputStream;
    import java.net.Socket;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JWindow;
    import javax.swing.SwingConstants;
    public class MovieSplashScreen {
    private javax.swing.JLabel lbimage;
    private javax.swing.JLabel lbloading;
    private javax.swing.JLabel lbmobile;
    private javax.swing.JPanel panelBack;
    public static void main(String[] ar) {
    new MovieSplashScreen().displaySplash(ar[0]);
    public void displaySplash(String mapperip) {
    JWindow window = new JWindow();
    window.getContentPane().add(
    new JLabel("Loading JFrame...", SwingConstants.CENTER));
    window.setSize(525, 240);
    Utility.setInCenter(window);
    panelBack = new javax.swing.JPanel();
    lbimage = new javax.swing.JLabel();
    lbloading = new javax.swing.JLabel();
    lbmobile = new javax.swing.JLabel();
    panelBack.setBackground(new java.awt.Color(255, 255, 255));
    panelBack.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 102), 2));
    panelBack.setLayout(null);
    lbimage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/agent/client/splash.jpg"))); // NOI18N
    panelBack.add(lbimage);
    lbimage.setBounds(250, 20, 250, 180);
    lbloading.setFont(new java.awt.Font("Showcard Gothic", 0, 30)); // NOI18N
    lbloading.setText("Loading...");
    panelBack.add(lbloading);
    lbloading.setBounds(50, 120, 210, 70);
    lbmobile.setFont(new java.awt.Font("Tekton Pro Cond", 0, 24)); // NOI18N
    lbmobile.setForeground(new java.awt.Color(0, 51, 51));
    lbmobile.setText("Mobile Agents 1.0");
    panelBack.add(lbmobile);
    lbmobile.setBounds(30, 20, 230, 40);
    window.add(panelBack, java.awt.BorderLayout.CENTER);
    window.setVisible(true);
    try {
    Thread.sleep(5000);
    } catch (InterruptedException e) {
    Socket client = null;
    try {
    client = new Socket(mapperip,2222);
    } catch (Exception e) {
    JOptionPane.showMessageDialog(null, "Mapping server down...");
    System.exit(0);
    DataInputStream din = null;
    DataOutputStream dout = null;
    String ips = null;
    try {
    din = new DataInputStream(client.getInputStream());
    dout = new DataOutputStream(client.getOutputStream());
    dout.writeUTF("movies");
    ips = din.readUTF();
    } catch (Exception e) {
    JOptionPane.showMessageDialog(null, "Cannot retrieve mappings...");
    e.printStackTrace();
    System.exit(0);
    window.setVisible(false);
    MovieClient sclient = new MovieClient(ips);
    sclient.setVisible(true);
    window.dispose();

  • Error compiling  oggvorbis example

    Hi
    I'm getting this error when I try to compile the
    AudioDecoderExample using oggvorbis library:
    Error: Could not resolve <defusion:FlexUnitRunner> to a
    component implementation.
    <defusion:FlexUnitRunner id="testRunner" width="100%"
    height="100%" test="{suite}" />
    Any suggestions?
    thanks,
    Maria

    Your error is unrelated to curl. You're not properly linking against gtk
    gcc curlgtk.c $(pkg-config --libs --cflags gtk+-2.0 libcurl)

  • Errors compiling the example.rmi_iiop.ejb.generic_idl example

    Hello,
    I have WebLogic Server 6.0, jdk1.3, Inprise's Visibroker for C++ 4.0 all on Windows
    NT.
    I am following the steps on the examples\rmi_iiop\ejb\generic_idl\package-summary.html
    page in my weblogic directory. The errors occur at step 3g of the section "Compile
    the c++ stubs and client source file ".
    The errors are output by the java compiler. They are:
    C:\bea\wlserver6.0 samples\examples\rmi_iiop\ejb\generic_idl>CL /MD /DTHREAD /no
    logo -DWIN32 /GX /DSTRICT /DALIGNED /DVISIBROKER /DMSVCUSING_BUG /DMSVCNESTEDUS
    ING_BUG -Icpp -Ic:\Inprise\vbroker\include -Ic:\Inprise\vbroker\include\stubs -I
    C:\bea\wlserver6.0\samples -c Trader_c.cpp TraderHome_c.cpp cpp\Client.cpp cpp\j
    avax\ejb\EJBObject_c.cpp cpp\javax\ejb\EJBHome_c.cpp cpp\javax\ejb\RemoveEx_c.cp
    p cpp\javax\ejb\RemoveException_c.cpp cpp\java\lang\_Object_c.cpp cpp\java\lang\
    Exc.cpp cpp\java\lang\_Exception_c.cpp cpp\java\lang\Throwable_c.cpp cpp\java\
    rmi\Remote_c.cpp cpp\java\io\PrintWriter_c.cpp cpp\java\io\PrintStream_c.cpp cpp
    \java\io\Writer_c.cpp cpp\java\io\Serializable_c.cpp cpp\java\io\IOException_c.c
    pp cpp\java\io\IOEx_c.cpp cpp\org\omg\boxedRMI\seq1_wchar_c.cpp
    Trader_c.cpp
    Trader_c.hh(15) : warning C4067: unexpected tokens following pragma directive -
    expected a newline
    cpp\javax/ejb/EJBObject_c.hh(15) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\javax/ejb/EJBObject_c.hh(18) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\javax/ejb/RemoveEx_c.hh(15) : warning C4067: unexpected tokens following pra
    gma directive - expected a newline
    cpp\javax/ejb/RemoveException_c.hh(15) : warning C4067: unexpected tokens follow
    ing pragma directive - expected a newline
    cpp\java/lang/_Exception_c.hh(15) : warning C4067: unexpected tokens following p
    ragma directive - expected a newline
    cpp\java/lang/Throwable_c.hh(15) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/lang/Throwable_c.hh(18) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintWriter_c.hh(15) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintWriter_c.hh(18) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintWriter_c.hh(21) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/Writer_c.hh(15) : warning C4067: unexpected tokens following pragma
    directive - expected a newline
    cpp\java/io/Writer_c.hh(18) : warning C4067: unexpected tokens following pragma
    directive - expected a newline
    cpp\java/io/IOEx_c.hh(15) : warning C4067: unexpected tokens following pragma di
    rective - expected a newline
    cpp\java/io/IOException_c.hh(15) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/IOException_c.hh(90) : error C2039: 'Exception' : is not a member of
    'lang'
    cpp\java/io/IOException_c.hh(90) : error C2504: 'Exception' : base class undefin
    ed
    cpp\java/io/IOException_c.hh(127) : error C2039: 'OBV_Exception' : is not a memb
    er of 'lang'
    cpp\java/io/IOException_c.hh(127) : error C2504: 'OBV_Exception' : base class un
    defined
    cpp\java/lang/Throwable_c.hh(21) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(15) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(18) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(21) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(22) : fatal error C1083: Cannot open include file:
    'org/omg/boxedRMI/seq1_octet_c.hh': No such file or directory
    TraderHome_c.cpp
    TraderHome_c.hh(15) : warning C4067: unexpected tokens following pragma directiv
    e - expected a newline
    C:\bea\wlserver6.0\samples\examples/rmi_iiop/ejb/generic_idl/Trader_c.hh(15) : w
    arning C4067: unexpected tokens following pragma directive - expected a newline
    cpp\javax/ejb/EJBObject_c.hh(15) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\javax/ejb/EJBObject_c.hh(18) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\javax/ejb/RemoveEx_c.hh(15) : warning C4067: unexpected tokens following pra
    gma directive - expected a newline
    cpp\javax/ejb/RemoveException_c.hh(15) : warning C4067: unexpected tokens follow
    ing pragma directive - expected a newline
    cpp\java/lang/_Exception_c.hh(15) : warning C4067: unexpected tokens following p
    ragma directive - expected a newline
    cpp\java/lang/Throwable_c.hh(15) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/lang/Throwable_c.hh(18) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintWriter_c.hh(15) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintWriter_c.hh(18) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintWriter_c.hh(21) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/Writer_c.hh(15) : warning C4067: unexpected tokens following pragma
    directive - expected a newline
    cpp\java/io/Writer_c.hh(18) : warning C4067: unexpected tokens following pragma
    directive - expected a newline
    cpp\java/io/IOEx_c.hh(15) : warning C4067: unexpected tokens following pragma di
    rective - expected a newline
    cpp\java/io/IOException_c.hh(15) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/IOException_c.hh(90) : error C2039: 'Exception' : is not a member of
    'lang'
    cpp\java/io/IOException_c.hh(90) : error C2504: 'Exception' : base class undefin
    ed
    cpp\java/io/IOException_c.hh(127) : error C2039: 'OBV_Exception' : is not a memb
    er of 'lang'
    cpp\java/io/IOException_c.hh(127) : error C2504: 'OBV_Exception' : base class un
    defined
    cpp\java/lang/Throwable_c.hh(21) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(15) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(18) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(21) : warning C4067: unexpected tokens following pr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(22) : fatal error C1083: Cannot open include file:
    'org/omg/boxedRMI/seq1_octet_c.hh': No such file or directory
    Client.cpp
    Have I misapplied some steps? Or, my env has not been set correctly?
    Any help would be greatly appreciated.
    Kevin Wu

    Thanks for your respond, Eduardo.
    Could you explain me in more detail why the C++ code doesn't compile, and how the
    new target in the make file can help us?
    Thanks!
    Eduardo Ceballos <[email protected]> wrote:
    There's nothing wrong with what you've done. The C code just doesn't compile.
    Grab WLS 6.0 SP1 when it is available (shortly). There is a new target in
    the make file that narrows the IDL production by method signature.
    Kevin Wu wrote:
    Hello,
    I have WebLogic Server 6.0, jdk1.3, Inprise's Visibroker for C++ 4.0 allon Windows
    NT.
    I am following the steps on the examples\rmi_iiop\ejb\generic_idl\package-summary.html
    page in my weblogic directory. The errors occur at step 3g of the section"Compile
    the c++ stubs and client source file ".
    The errors are output by the java compiler. They are:
    C:\bea\wlserver6.0 samples\examples\rmi_iiop\ejb\generic_idl>CL /MD /DTHREAD/no
    logo -DWIN32 /GX /DSTRICT /DALIGNED /DVISIBROKER /DMSVCUSING_BUG /DMSVCNESTEDUS
    ING_BUG -Icpp -Ic:\Inprise\vbroker\include -Ic:\Inprise\vbroker\include\stubs-I
    C:\bea\wlserver6.0\samples -c Trader_c.cpp TraderHome_c.cpp cpp\Client.cppcpp\j
    avax\ejb\EJBObject_c.cpp cpp\javax\ejb\EJBHome_c.cpp cpp\javax\ejb\RemoveEx_c.cp
    p cpp\javax\ejb\RemoveException_c.cpp cpp\java\lang\_Object_c.cpp cpp\java\lang\
    Exc.cpp cpp\java\lang\_Exception_c.cpp cpp\java\lang\Throwable_c.cppcpp\java\
    rmi\Remote_c.cpp cpp\java\io\PrintWriter_c.cpp cpp\java\io\PrintStream_c.cppcpp
    \java\io\Writer_c.cpp cpp\java\io\Serializable_c.cpp cpp\java\io\IOException_c.c
    pp cpp\java\io\IOEx_c.cpp cpp\org\omg\boxedRMI\seq1_wchar_c.cpp
    Trader_c.cpp
    Trader_c.hh(15) : warning C4067: unexpected tokens following pragma directive-
    expected a newline
    cpp\javax/ejb/EJBObject_c.hh(15) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\javax/ejb/EJBObject_c.hh(18) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\javax/ejb/RemoveEx_c.hh(15) : warning C4067: unexpected tokens followingpra
    gma directive - expected a newline
    cpp\javax/ejb/RemoveException_c.hh(15) : warning C4067: unexpected tokensfollow
    ing pragma directive - expected a newline
    cpp\java/lang/_Exception_c.hh(15) : warning C4067: unexpected tokens followingp
    ragma directive - expected a newline
    cpp\java/lang/Throwable_c.hh(15) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/lang/Throwable_c.hh(18) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintWriter_c.hh(15) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintWriter_c.hh(18) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintWriter_c.hh(21) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/Writer_c.hh(15) : warning C4067: unexpected tokens followingpragma
    directive - expected a newline
    cpp\java/io/Writer_c.hh(18) : warning C4067: unexpected tokens followingpragma
    directive - expected a newline
    cpp\java/io/IOEx_c.hh(15) : warning C4067: unexpected tokens followingpragma di
    rective - expected a newline
    cpp\java/io/IOException_c.hh(15) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/IOException_c.hh(90) : error C2039: 'Exception' : is not amember of
    'lang'
    cpp\java/io/IOException_c.hh(90) : error C2504: 'Exception' : base classundefin
    ed
    cpp\java/io/IOException_c.hh(127) : error C2039: 'OBV_Exception' : isnot a memb
    er of 'lang'
    cpp\java/io/IOException_c.hh(127) : error C2504: 'OBV_Exception' : baseclass un
    defined
    cpp\java/lang/Throwable_c.hh(21) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(15) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(18) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(21) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(22) : fatal error C1083: Cannot open includefile:
    'org/omg/boxedRMI/seq1_octet_c.hh': No such file or directory
    TraderHome_c.cpp
    TraderHome_c.hh(15) : warning C4067: unexpected tokens following pragmadirectiv
    e - expected a newline
    C:\bea\wlserver6.0\samples\examples/rmi_iiop/ejb/generic_idl/Trader_c.hh(15): w
    arning C4067: unexpected tokens following pragma directive - expecteda newline
    cpp\javax/ejb/EJBObject_c.hh(15) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\javax/ejb/EJBObject_c.hh(18) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\javax/ejb/RemoveEx_c.hh(15) : warning C4067: unexpected tokens followingpra
    gma directive - expected a newline
    cpp\javax/ejb/RemoveException_c.hh(15) : warning C4067: unexpected tokensfollow
    ing pragma directive - expected a newline
    cpp\java/lang/_Exception_c.hh(15) : warning C4067: unexpected tokens followingp
    ragma directive - expected a newline
    cpp\java/lang/Throwable_c.hh(15) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/lang/Throwable_c.hh(18) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintWriter_c.hh(15) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintWriter_c.hh(18) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintWriter_c.hh(21) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/Writer_c.hh(15) : warning C4067: unexpected tokens followingpragma
    directive - expected a newline
    cpp\java/io/Writer_c.hh(18) : warning C4067: unexpected tokens followingpragma
    directive - expected a newline
    cpp\java/io/IOEx_c.hh(15) : warning C4067: unexpected tokens followingpragma di
    rective - expected a newline
    cpp\java/io/IOException_c.hh(15) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/IOException_c.hh(90) : error C2039: 'Exception' : is not amember of
    'lang'
    cpp\java/io/IOException_c.hh(90) : error C2504: 'Exception' : base classundefin
    ed
    cpp\java/io/IOException_c.hh(127) : error C2039: 'OBV_Exception' : isnot a memb
    er of 'lang'
    cpp\java/io/IOException_c.hh(127) : error C2504: 'OBV_Exception' : baseclass un
    defined
    cpp\java/lang/Throwable_c.hh(21) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(15) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(18) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(21) : warning C4067: unexpected tokens followingpr
    agma directive - expected a newline
    cpp\java/io/PrintStream_c.hh(22) : fatal error C1083: Cannot open includefile:
    'org/omg/boxedRMI/seq1_octet_c.hh': No such file or directory
    Client.cpp
    Have I misapplied some steps? Or, my env has not been set correctly?
    Any help would be greatly appreciated.
    Kevin Wu

  • Error compiling OCCI example -  undefined reference

    Hello.
    I am having trouble linking a simple Oracle OCCI example using SunStudio 12 , Update 1 on RHEL 5.2 . This is the error.
    ~/demo]$ cat new.C
    #include<occi.h>
    using namespace oracle::occi;
    int main(){
    Environment *envr;
    envr=Environment::createEnvironment(Environment::DEFAULT);
    ~/demo]$ CC -L/apps/oracle/product/10.2.0/lib -I/apps/oracle/product/10.2.0/rdbms/public -locci -lclntsh new.C
    new.o: In function `main':
    new.C:(.text+0x64): undefined reference to `oracle::occi::Environment*oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode,void*,void*(*)(void*,unsigned long),void*(*)(void*,void*,unsigned long),void(*)(void*,void*))'
    The same example compiles and links with a warning with g++ . executable is created.
    ~/demo]$ g++34 -L/apps/oracle/product/10.2.0/lib -I/apps/oracle/product/10.2.0/rdbms/public -locci -lclntsh new.C
    /usr/bin/ld: warning: libstdc++.so.5, needed by /apps/oracle/product/10.2.0/lib/libocci.so, may conflict with libstdc++.so.6
    Any ideas what may be wrong here ?
    Edited by: machambi on Jun 24, 2010 1:56 PM

    Well, without being able to recreate it myself, I think I'm stumped. I figured it was a linking error based on the error message but the format of the error message isn't familiar to me. What platform is this being done on?
    Other things I would do to try to track down the issue (I'm sure you've probably done most of these, but just to be thorough):
    Verify that the ${ORACLE_HOME}/lib/libocci.a library exists and you have read access to it. It will often be a symbolic link to a versioned library such as ${ORACLE_HOME}/lib/libocci10.a. In our Oracle installation we have a ${ORACLE_HOME}/lib and an ${ORACLE_HOME}/lib32, and in our case the libocci.a file is actually installed in the lib32 directory. However, I doubt the library is missing otherwise you would get a library not found error instead, but I'm not sure what error you would get if you didn't have read permissions.
    Try linking it directly instead of going through CC.
    Use a command like:
    ~/demo]$ nm -C ${ORACLE_HOME}/lib/libocci.a |grep "::createEnvironment(oracle" to make sure the function can be found within the occi library and in the format the linker is looking for.
    Look over the man pages on your linker looking for clarification on how it locates libraries, if it looks in additional locations or if there are any environment variables that would effect the paths you provided on the command line.
    -Christian

  • CS5 SDK Error compiling Adobe examples.

    Hi,
    I downloaded the trial version of Illustrator CS5 and the CS5 SDK to be able to adapt my plugins.
    These plugins are for CS4.
    Each time I try to compile one of the samples provided in the CS5 SDK, I have the same error
    error: extra qualification 'AIPlatformFileDlgOpts::' on member 'AIPlatformFileDlgOpts'
    Do you Know what to modify to avoid this error.
    I use XCode 3.2.2 and MacOS.
    Please help me.
    JLG.

    I just had the very same problem. I changed the compiler from GCC 4.2 to GCC 4.0 in the project settings. That did the trick.

  • Facing syntax error in this simple code snippet

    select case
    when to_number (to_char(sysdate,'mm')) < 7
    then (to_number(to_char(sysdate,'yyyy')) - 1)
    from dual
    --while if in block works fine
    declare
    year number;
    begin
    year := to_number(to_char(sysdate,'yyyy'));
    if (to_number(to_char(sysdate,'mm')) < 7) then
    year := year - 1;
    end if;
    dbms_output.put_line('year = '|| year);
    end;

    You can have:
    -- 1 case expression
    -- 1.2 searched case expressions
    -- 2 simple case statement
    -- 2.1 searched case statement
    In your case you need the first one(-- 1 case expression ), because you return an expression.
    Indeed a simple case statement let you choose a sequence of PL/SQL statements to execute. This follows another syntax.
    It's not always true this statements
    In PL/SQL you would use "END CASE". For this reason I can quietly show you that I can even use 'case expression' in PL/SQL, without end case:
    DECLARE
        subtype TTempWord is varchar2(20);         -- good notation :-)
        valToCompare constant tTempWord:='test';
        temp  tTempWord ;  
        temp2 tTempWord ;
        --- start locals-------     ;-)
        procedure Compare_Display  -- with no parameters just for this dummy test!
        is
        begin
          dbms_output.put_line('Word to compare:'||valToCompare); 
          dbms_output.put_line('temp:'||temp);
          dbms_output.put_line('temp2:'||nvl(temp2,'not assigned'));
          temp2:= case temp when valToCompare then 'identic ' else 'NOT identic' end ; -- I'm  not using *'END CASE'*
          dbms_output.put_line('    --- after the assignation --->');
          dbms_output.put_line('temp:'||temp);
          dbms_output.put_line('temp2:'||temp2);        
          dbms_output.new_line;dbms_output.new_line;
        end;
        --- end locals-------     ;-)
    BEGIN
          temp:='testttt'; 
          Compare_Display ;
          temp:=valToCompare;
          temp2:='';
          Compare_Display ;
    END;--output
    Word to compare:test
    temp:testttt
    temp2:not assigned
        --- after the assignation --->
    temp:testttt
    temp2:NOT identic
    Word to compare:test
    temp:test
    temp2:not assigned
        --- after the assignation --->
    temp:test
    temp2:identic
    PS:for more explanations related to all the cases you could look for at http://tahiti.oracle.com/
    Edited by: zep111 on Apr 28, 2011 11:25 AM

  • Error 200428 in linux example code

    Hi All;
    I'm trying to use the mx daq-base on a redhat 9.0 system. I have a 6031E installed(pci). I've installed the hardware, then the software and compiled the example code. When I try to run the writeDigPort example I get;
    Device indentifier is invalid.
    DAQmxBase Error: -200428
    lsdaq reports:
    NI 603E: "Dev2" (PXIO::16::0)
    Nay ideas?
    Pat

    After further looking into the problem I'm getting an error -200220
    here is the suspect code
    char chan[] = "dev1/port0:1";
    error1= DAQmxBaseCreateDOChan(taskHandle,chan,"",DAQmx_Val​_ChanForAllLines);
    DAQmxBaseGetExtendedErrorInfo (errBuff, 2048);
    printf("\nDAQmxBaseCreateDOChan returned %d %s",error1,errBuff);
    This gives the following output
    DAQmxBaseCreateTask returned 0
    DAQmxBaseCreateDOChan returned -200220 Device identifier is invalid.
    Data to write: 0x55
    DAQmxBaseGetExtendedErrorInfo returned -200428 Value passed to the Task/Channels In control is invalid.
    Anyone have any idea?
    Pat

  • Has anyone got the Comsoft Profinet example code working??

    Hello!
    I have a cRIO Profinet card and I'm attempting to get the example code working.
    I have followed the instructions in GettingStarted_cRIO_PN_IO_Device.pdf
    I have created an empty project with just the 9023 and 9113 present, and copied the 3 items from the example project cRIO PN IO-Device (LV 2012) as per the documentation.
    When I try to compile I get the error shown attached.  I cannot view the error as the VI is password protected.
    In 5 years of working with cRIO using many different c-series modules from NI and 3rd parties I have never come across a password protected example Vi - this is very disappointing!  I don't see how it will be possible to use the card without being able to access this VI, and clearly it is impossible to use it without this VI as they are unwilling to share its functionality.
    Has anyone got this working on anything other than a 9104 (which the example uses?)  Does anyone know the password?  Is it possible to use the card without using this example code?
    I will be communicating with a Siemens PLC (acquiring a load of U16s and logging on the cRIO at 20ms intervals).
    Many thanks for any input, or any experiences of using this card.
    Aaron
    LabVIEW/RT/FPGA 2012
    NI-RIO 12.0.1
    cRIO 9023 controller and 9113 chassis with COMSOFT PN module in slot 1.
    Attachments:
    PN_error.png ‏44 KB
    PN_error2.png ‏20 KB

    Just for the record, I am using the CRIO-PN with cRIO-9081 and cRIO-9068 integrated chassis successfully.
    LabVIEW (RT/FPGA) 2013 SP1.
    I didn't use the higher level ComSoft example code directly, as the VIs use so many control/indicators that the FPGA usage is sky high. I rewrote them to pass the I/O data via DMA FIFOs.

  • I can' t compile Stratus example from Adobe sample...

    Hey guys !
    First, please sorry for my bad english, I'm french and it's a pain to explain this kind of problem in foreign language...
    I 'm trying to compile the example code found in Stratus sample (the audio/video chat), but I think some package are missed because Flex found a lot of error. Flex tell me that I'm trying to use some class or properties that doesn't exist...
    Here the list of the missing elements :
    - NetStreamInfo
    - Microphone.codec
    - NetStream.DIRECT_CONNECTIONS
    - Microphone.encodeQuality
    - NetStream.farId
    - Microphone.framesPerPacket
    - NetStream.info
    - NetConnection.nearId
    - NetStream.peerStream
    - SoundCodec
    I 'm using Flex Builder 3.02 (downloaded from the link at the bottom of the stratus' presentation page).I have my Stratus Key, but the problem is not here because I'm unable to launch the compilation...
    Where can I find the class / package I need ?
    In other terms, how can I compile the stratus example with no error.
    Thanks a lot !

    you probably forgot to set the minimum Flash Player version to 10.0.0 in the Flex build settings.  open the Properties for your Flex project, go to the "Flex Compiler" property, and in the "HTML wrapper" section's "Require Flash Player version" enter 10.0.0 in the boxes.  that will enable the compiler to recognize Flash Player 10 APIs.
    -mike

  • Can't compile this sourcecode

    why i can't compile this source code??
    if i not mistaken the error like this "can't read bla..bla(i din't remember)"
    (i've install all the java package..)
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.Date;
    import java.util.Hashtable;
    * Date Servlet
    * This is a simple servlet to demonstrate server-side include
    * It returns a string representation of the current time.
    * @author Scott Atwood
    * @version 1.12, 08/29/97
    public class DateServlet extends HttpServlet {
    public void service(HttpServletRequest req, HttpServletResponse res)
         throws ServletException, IOException
    Date today = new Date();
    res.setContentType("text/plain");
    //getOutputStream ni aper?
    ServletOutputStream out = res.getOutputStream();
    out.println(today.toString());
    public String getServletInfo() {
    return "Returns a string representation of the current time";

    Try it again. And this time write down the error message you get so you can ask a coherent question.

Maybe you are looking for

  • Location settings/GPS can't change the options - used to be able to!

    I've read another thread with the same problem and people are saying you must've been connected to something with GPS - I haven't, nobody in my house has a phone or anything else that connects to GPS so it's not possible. I was trying to get this new

  • Radio Frequency-confirmation OT on an outbound delivery with HU

    Hello Every Body, I have a problem using standard transaction for the Radio Frequency. I explain my problem. I would like to make a Good Issue with an outbound delivery by RF. I create my outbound delivery with transaction MB1A. And then I want to do

  • Acrobat 9, shared reviews, and looking for "Save As" option

    Hello to all, I am wondering whether you can help with an annoyance in setting up shared reviews under Acrobat 9. Background: I first established shared reviews at my company using Acrobat 8 and our own internal WebDAV server. The setup worked, and s

  • RAISING ALERT

    Hi, I want to raise an alert out side BPM. e.g.: I got one failure in message mapping, where I need to raise the alert for any mapping exception. I don't want to raise an alert in BPM, because, If I raise an alert in BPM, The message mapping status i

  • Embedded Youtube video sound issues HELP!!

    Hello. This is my site http://mattpartridgeanimation.com/ In my 'animation' section I'm loading youtube clips to my site using this AS3 script found here. This all works fine but when i use my buttons created in flash to load the new container_mc, th