1

Mavenを使用してビルドされたJavaアプリでこの例を使用しようとしています。pom.xml インクルード

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.2.1</version>
            <executions>
                <execution>
                    <id>javacpp</id>
                    <phase>process-classes</phase>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                    <configuration>
                        <executable>java</executable>
                        <arguments>
                            <argument>-jar</argument>       <argument>/home/JCuda/javacpp.jar</argument>
                            <argument>-classpath</argument> <argument>${project.build.outputDirectory}:/home/JCuda/jcuda-0.5.0.jar:/home/JCuda/jcusparse-0.5.0.jar</argument>
                            <argument>-d</argument>         <argument>${project.build.outputDirectory}/lib/</argument>
                            <argument>-properties</argument>    <argument>linux-x86_64-cuda</argument>
                        </arguments>
                    </configuration>
                </execution>
            </executions>
        </plugin>

nvcc が .cu ファイルをコンパイルしているとき、エラー
/home/TestWebapp6/target/classes/lib/jniCudaOps.cu(1154): error: a namespace name is not allowed
が表示されます。コードではこの行です

JNIEXPORT void JNICALL Java_com_skenzo_cuda_CudaOps_copy(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) {
    thrust* ptr0 = arg0; //line showing the first error
    thrust* ptr1 = arg1;
....  

手がかりはありますか?

4

1 に答える 1